1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-07 00:21:32 +01:00

[pm-16949] Include revoked users in applicable policies (#5261)

This commit is contained in:
Jimmy Vo 2025-01-20 10:49:33 -05:00 committed by GitHub
parent 04e5626c57
commit ee2d7df061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2249,7 +2249,7 @@ public class OrganizationService : IOrganizationService
if (!userHasTwoFactorEnabled) if (!userHasTwoFactorEnabled)
{ {
var invitedTwoFactorPolicies = await _policyService.GetPoliciesApplicableToUserAsync(userId, var invitedTwoFactorPolicies = await _policyService.GetPoliciesApplicableToUserAsync(userId,
PolicyType.TwoFactorAuthentication, OrganizationUserStatusType.Invited); PolicyType.TwoFactorAuthentication, OrganizationUserStatusType.Revoked);
if (invitedTwoFactorPolicies.Any(p => p.OrganizationId == orgUser.OrganizationId)) if (invitedTwoFactorPolicies.Any(p => p.OrganizationId == orgUser.OrganizationId))
{ {
twoFactorCompliant = false; twoFactorCompliant = false;