mirror of
https://github.com/bitwarden/server.git
synced 2025-01-22 21:51:22 +01:00
[EC-741 Single Organization policy exception when an Invited status user is also in the Revoked status (#2568)
* [EC-741] Check that OrganizationUsers to be removed have a UserId * [EC-741] Filtering Revoked users in query for users to remove from organization
This commit is contained in:
parent
266d426c80
commit
c6c0f95ed7
@ -89,7 +89,7 @@ public class PolicyService : IPolicyService
|
||||
var orgUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(
|
||||
policy.OrganizationId);
|
||||
var removableOrgUsers = orgUsers.Where(ou =>
|
||||
ou.Status != Enums.OrganizationUserStatusType.Invited &&
|
||||
ou.Status != Enums.OrganizationUserStatusType.Invited && ou.Status != Enums.OrganizationUserStatusType.Revoked &&
|
||||
ou.Type != Enums.OrganizationUserType.Owner && ou.Type != Enums.OrganizationUserType.Admin &&
|
||||
ou.UserId != savingUserId);
|
||||
switch (policy.Type)
|
||||
|
Loading…
Reference in New Issue
Block a user