mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
[AC-2213] Add Flexible Collections information in the Bitwarden Portal (#3801)
* Add Flexible Collections information in the Bitwarden Portal * Add collection management settings * Add headings
This commit is contained in:
parent
faf84f9aa9
commit
4ae86b7d34
@ -9,11 +9,15 @@ namespace Bit.Admin.AdminConsole.Models;
|
|||||||
|
|
||||||
public class OrganizationViewModel
|
public class OrganizationViewModel
|
||||||
{
|
{
|
||||||
public OrganizationViewModel() { }
|
public OrganizationViewModel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public OrganizationViewModel(Organization org, Provider provider, IEnumerable<OrganizationConnection> connections,
|
public OrganizationViewModel(Organization org, Provider provider, IEnumerable<OrganizationConnection> connections,
|
||||||
IEnumerable<OrganizationUserUserDetails> orgUsers, IEnumerable<Cipher> ciphers, IEnumerable<Collection> collections,
|
IEnumerable<OrganizationUserUserDetails> orgUsers, IEnumerable<Cipher> ciphers,
|
||||||
IEnumerable<Group> groups, IEnumerable<Policy> policies, int secretsCount, int projectCount, int serviceAccountsCount,
|
IEnumerable<Collection> collections,
|
||||||
|
IEnumerable<Group> groups, IEnumerable<Policy> policies, int secretsCount, int projectCount,
|
||||||
|
int serviceAccountsCount,
|
||||||
int occupiedSmSeatsCount)
|
int occupiedSmSeatsCount)
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -65,4 +69,14 @@ public class OrganizationViewModel
|
|||||||
public int ServiceAccountsCount { get; set; }
|
public int ServiceAccountsCount { get; set; }
|
||||||
public int OccupiedSmSeatsCount { get; set; }
|
public int OccupiedSmSeatsCount { get; set; }
|
||||||
public bool UseSecretsManager => Organization.UseSecretsManager;
|
public bool UseSecretsManager => Organization.UseSecretsManager;
|
||||||
|
|
||||||
|
public string GetCollectionManagementSetting(bool collectionManagementSetting)
|
||||||
|
{
|
||||||
|
if (!Organization.FlexibleCollections)
|
||||||
|
{
|
||||||
|
return "N/A";
|
||||||
|
}
|
||||||
|
|
||||||
|
return collectionManagementSetting ? "On" : "Off";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,6 @@
|
|||||||
<dt class="col-sm-4 col-lg-3">Using 2FA</dt>
|
<dt class="col-sm-4 col-lg-3">Using 2FA</dt>
|
||||||
<dd class="col-sm-8 col-lg-9">@(Model.Organization.TwoFactorIsEnabled() ? "Yes" : "No")</dd>
|
<dd class="col-sm-8 col-lg-9">@(Model.Organization.TwoFactorIsEnabled() ? "Yes" : "No")</dd>
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Items</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@Model.CipherCount</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Collections</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@Model.CollectionCount</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Secrets</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.SecretsCount: "N/A")</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Projects</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.ProjectsCount: "N/A")</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Service Accounts</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.ServiceAccountsCount: "N/A")</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Secrets Manager Seats</dt>
|
|
||||||
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.OccupiedSmSeatsCount: "N/A" )</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Groups</dt>
|
<dt class="col-sm-4 col-lg-3">Groups</dt>
|
||||||
<dd class="col-sm-8 col-lg-9">@Model.GroupCount</dd>
|
<dd class="col-sm-8 col-lg-9">@Model.GroupCount</dd>
|
||||||
|
|
||||||
@ -59,3 +41,36 @@
|
|||||||
<dt class="col-sm-4 col-lg-3">Modified</dt>
|
<dt class="col-sm-4 col-lg-3">Modified</dt>
|
||||||
<dd class="col-sm-8 col-lg-9">@Model.Organization.RevisionDate.ToString()</dd>
|
<dd class="col-sm-8 col-lg-9">@Model.Organization.RevisionDate.ToString()</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<h2>Password Manager</h2>
|
||||||
|
<dl class="row">
|
||||||
|
<dt class="col-sm-4 col-lg-3">Items</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@Model.CipherCount</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Collections</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@Model.CollectionCount</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Collection management enhancements</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.Organization.FlexibleCollections ? "On" : "Off")</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Administrators manage all collections</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.GetCollectionManagementSetting(Model.Organization.AllowAdminAccessToAllCollectionItems))</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Limit collection creation to administrators</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.GetCollectionManagementSetting(Model.Organization.LimitCollectionCreationDeletion))</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h2>Secrets Manager</h2>
|
||||||
|
<dl class="row">
|
||||||
|
<dt class="col-sm-4 col-lg-3">Secrets</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.SecretsCount: "N/A")</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Projects</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.ProjectsCount: "N/A")</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Service Accounts</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.ServiceAccountsCount: "N/A")</dd>
|
||||||
|
|
||||||
|
<dt class="col-sm-4 col-lg-3">Secrets Manager Seats</dt>
|
||||||
|
<dd class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.OccupiedSmSeatsCount: "N/A" )</dd>
|
||||||
|
</dl>
|
||||||
|
Loading…
Reference in New Issue
Block a user