mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Remove noncompliant users for new policies (#1951)
This commit is contained in:
parent
de997a2246
commit
669d44c170
@ -84,7 +84,8 @@ namespace Bit.Core.Services
|
||||
{
|
||||
policy.CreationDate = now;
|
||||
}
|
||||
else if (policy.Enabled)
|
||||
|
||||
if (policy.Enabled)
|
||||
{
|
||||
var currentPolicy = await _policyRepository.GetByIdAsync(policy.Id);
|
||||
if (!currentPolicy?.Enabled ?? true)
|
||||
@ -95,7 +96,7 @@ namespace Bit.Core.Services
|
||||
ou.Status != Enums.OrganizationUserStatusType.Invited &&
|
||||
ou.Type != Enums.OrganizationUserType.Owner && ou.Type != Enums.OrganizationUserType.Admin &&
|
||||
ou.UserId != savingUserId);
|
||||
switch (currentPolicy.Type)
|
||||
switch (policy.Type)
|
||||
{
|
||||
case Enums.PolicyType.TwoFactorAuthentication:
|
||||
foreach (var orgUser in removableOrgUsers)
|
||||
|
Loading…
Reference in New Issue
Block a user