1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-15 20:41:35 +01:00

[PM-10319] - Send 2FA Email when policy enabled (#5233)

* Correcting which email is sent when enabling 2FA policy.

* Fixing the test.
This commit is contained in:
Jared McCannon 2025-01-09 09:35:40 -06:00 committed by GitHub
parent fb72e82d9a
commit e754ae4729
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ public class TwoFactorAuthenticationPolicyValidator : IPolicyValidator
} }
await Task.WhenAll(currentActiveRevocableOrganizationUsers.Select(x => await Task.WhenAll(currentActiveRevocableOrganizationUsers.Select(x =>
_mailService.SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(organization.DisplayName(), x.Email))); _mailService.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(), x.Email)));
} }
private async Task RemoveNonCompliantUsersAsync(Guid organizationId) private async Task RemoveNonCompliantUsersAsync(Guid organizationId)

View File

@ -351,7 +351,7 @@ public class TwoFactorAuthenticationPolicyValidatorTests
await sutProvider.GetDependency<IMailService>() await sutProvider.GetDependency<IMailService>()
.Received(1) .Received(1)
.SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(organization.DisplayName(), .SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(),
"user3@test.com"); "user3@test.com");
} }
} }