1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 20:53:16 +00: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:
Thomas Rittson
2022-09-23 14:30:39 +10:00
committed by GitHub
parent c494d344d2
commit 7c3637c8ba
7 changed files with 49 additions and 21 deletions

View File

@@ -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; }