mirror of
https://github.com/bitwarden/server
synced 2026-02-11 22:13:24 +00: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:
@@ -104,7 +104,7 @@ public class TwoFactorAuthenticationPolicyValidator : IPolicyValidator
|
||||
}
|
||||
|
||||
await Task.WhenAll(currentActiveRevocableOrganizationUsers.Select(x =>
|
||||
_mailService.SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(organization.DisplayName(), x.Email)));
|
||||
_mailService.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(), x.Email)));
|
||||
}
|
||||
|
||||
private async Task RemoveNonCompliantUsersAsync(Guid organizationId)
|
||||
|
||||
@@ -351,7 +351,7 @@ public class TwoFactorAuthenticationPolicyValidatorTests
|
||||
|
||||
await sutProvider.GetDependency<IMailService>()
|
||||
.Received(1)
|
||||
.SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(organization.DisplayName(),
|
||||
.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(),
|
||||
"user3@test.com");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user