mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[EC-387] Don't count revoked users towards occupied seat count (#2256)
Also autoscale seats when restoring user if required
This commit is contained in:
@ -18,7 +18,7 @@ public class OrganizationViewModel
|
||||
UserInvitedCount = orgUsers.Count(u => u.Status == OrganizationUserStatusType.Invited);
|
||||
UserAcceptedCount = orgUsers.Count(u => u.Status == OrganizationUserStatusType.Accepted);
|
||||
UserConfirmedCount = orgUsers.Count(u => u.Status == OrganizationUserStatusType.Confirmed);
|
||||
UserCount = orgUsers.Count();
|
||||
OccupiedSeatCount = orgUsers.Count(u => u.OccupiesOrganizationSeat);
|
||||
CipherCount = ciphers.Count();
|
||||
CollectionCount = collections.Count();
|
||||
GroupCount = groups?.Count() ?? 0;
|
||||
@ -40,7 +40,7 @@ public class OrganizationViewModel
|
||||
public int UserInvitedCount { get; set; }
|
||||
public int UserConfirmedCount { get; set; }
|
||||
public int UserAcceptedCount { get; set; }
|
||||
public int UserCount { get; set; }
|
||||
public int OccupiedSeatCount { get; set; }
|
||||
public int CipherCount { get; set; }
|
||||
public int CollectionCount { get; set; }
|
||||
public int GroupCount { get; set; }
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
<dt class="col-sm-4 col-lg-3">Users</dt>
|
||||
<dd class="col-sm-8 col-lg-9">
|
||||
@Model.UserCount / @(Model.Organization.Seats?.ToString() ?? "-")
|
||||
@Model.OccupiedSeatCount / @(Model.Organization.Seats?.ToString() ?? "-")
|
||||
(<span title="Invited">@Model.UserInvitedCount</span> /
|
||||
<span title="Accepted">@Model.UserAcceptedCount</span> /
|
||||
<span title="Confirmed">@Model.UserConfirmedCount</span>)
|
||||
|
Reference in New Issue
Block a user