mirror of
https://github.com/bitwarden/server.git
synced 2025-06-01 08:40:33 -05:00
Invert two-factor compliance check in RestoreOrganizationUserCommand to ensure correct validation of organization user policies.
This commit is contained in:
parent
019b39feac
commit
451711bfe0
@ -274,7 +274,7 @@ public class RestoreOrganizationUserCommand(
|
|||||||
// Enforce 2FA Policy of organization user is trying to join
|
// Enforce 2FA Policy of organization user is trying to join
|
||||||
if (!userHasTwoFactorEnabled)
|
if (!userHasTwoFactorEnabled)
|
||||||
{
|
{
|
||||||
twoFactorCompliant = await IsTwoFactorRequiredForOrganizationAsync(userId, orgUser.OrganizationId);
|
twoFactorCompliant = !await IsTwoFactorRequiredForOrganizationAsync(userId, orgUser.OrganizationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var user = await userRepository.GetByIdAsync(userId);
|
var user = await userRepository.GetByIdAsync(userId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user