mirror of
https://github.com/bitwarden/server.git
synced 2025-06-13 06:20:48 -05:00
replace owner/admins list with table (#5892)
This commit is contained in:
parent
6486354fbc
commit
930fe29c82
@ -44,6 +44,8 @@ public class OrganizationViewModel
|
|||||||
orgUsers
|
orgUsers
|
||||||
.Where(u => u.Type == OrganizationUserType.Admin && u.Status == organizationUserStatus)
|
.Where(u => u.Type == OrganizationUserType.Admin && u.Status == organizationUserStatus)
|
||||||
.Select(u => u.Email));
|
.Select(u => u.Email));
|
||||||
|
OwnersDetails = orgUsers.Where(u => u.Type == OrganizationUserType.Owner && u.Status == organizationUserStatus);
|
||||||
|
AdminsDetails = orgUsers.Where(u => u.Type == OrganizationUserType.Admin && u.Status == organizationUserStatus);
|
||||||
SecretsCount = secretsCount;
|
SecretsCount = secretsCount;
|
||||||
ProjectsCount = projectCount;
|
ProjectsCount = projectCount;
|
||||||
ServiceAccountsCount = serviceAccountsCount;
|
ServiceAccountsCount = serviceAccountsCount;
|
||||||
@ -70,4 +72,6 @@ public class OrganizationViewModel
|
|||||||
public int OccupiedSmSeatsCount { get; set; }
|
public int OccupiedSmSeatsCount { get; set; }
|
||||||
public bool UseSecretsManager => Organization.UseSecretsManager;
|
public bool UseSecretsManager => Organization.UseSecretsManager;
|
||||||
public bool UseRiskInsights => Organization.UseRiskInsights;
|
public bool UseRiskInsights => Organization.UseRiskInsights;
|
||||||
|
public IEnumerable<OrganizationUserUserDetails> OwnersDetails { get; set; }
|
||||||
|
public IEnumerable<OrganizationUserUserDetails> AdminsDetails { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,6 @@
|
|||||||
<span id="org-confirmed-users" title="Confirmed">@Model.UserConfirmedCount</span>)
|
<span id="org-confirmed-users" title="Confirmed">@Model.UserConfirmedCount</span>)
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Owners</dt>
|
|
||||||
<dd id="org-owner" class="col-sm-8 col-lg-9">@(string.IsNullOrWhiteSpace(Model.Owners) ? "None" : Model.Owners)</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Admins</dt>
|
|
||||||
<dd id="org-admins" class="col-sm-8 col-lg-9">@(string.IsNullOrWhiteSpace(Model.Admins) ? "None" : Model.Admins)</dd>
|
|
||||||
|
|
||||||
<dt class="col-sm-4 col-lg-3">Using 2FA</dt>
|
<dt class="col-sm-4 col-lg-3">Using 2FA</dt>
|
||||||
<dd id="org-2fa" class="col-sm-8 col-lg-9">@(Model.Organization.TwoFactorIsEnabled() ? "Yes" : "No")</dd>
|
<dd id="org-2fa" class="col-sm-8 col-lg-9">@(Model.Organization.TwoFactorIsEnabled() ? "Yes" : "No")</dd>
|
||||||
|
|
||||||
@ -76,3 +70,49 @@
|
|||||||
<dt class="col-sm-4 col-lg-3">Secrets Manager Seats</dt>
|
<dt class="col-sm-4 col-lg-3">Secrets Manager Seats</dt>
|
||||||
<dd id="sm-seat-count" class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.OccupiedSmSeatsCount: "N/A" )</dd>
|
<dd id="sm-seat-count" class="col-sm-8 col-lg-9">@(Model.UseSecretsManager ? Model.OccupiedSmSeatsCount: "N/A" )</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<h2>Administrators</h2>
|
||||||
|
<dl class="row">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<div class="col-8">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 190px;">Email</th>
|
||||||
|
<th style="width: 60px;">Role</th>
|
||||||
|
<th style="width: 40px;">Status</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if(!Model.Admins.Any() && !Model.Owners.Any())
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">No results to list.</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@foreach(var owner in Model.OwnersDetails)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">@owner.Email</td>
|
||||||
|
<td class="align-middle">Owner</td>
|
||||||
|
<td class="align-middle">@owner.Status</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
|
||||||
|
@foreach(var admin in Model.AdminsDetails)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">@admin.Email</td>
|
||||||
|
<td class="align-middle">Admin</td>
|
||||||
|
<td class="align-middle">@admin.Status</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user