1
0
mirror of https://github.com/bitwarden/server synced 2026-01-03 17:14:00 +00:00

removed recursive call.

This commit is contained in:
Jared McCannon
2025-11-26 14:40:24 -06:00
parent 7c5d6aef37
commit 23ca1b6985
2 changed files with 8 additions and 8 deletions

View File

@@ -92,12 +92,12 @@ public class PolicyService : IPolicyService
OrganizationUserType[] excludedUserTypes;
if (policyType == PolicyType.SingleOrg
&& _featureService.IsEnabled(FeatureFlagKeys.AutomaticConfirmUsers)
&& await GetPoliciesApplicableToUserAsync(userId, PolicyType.AutomaticUserConfirmation, OrganizationUserStatusType.Revoked) is { Count: > 0 })
if (policyType == PolicyType.SingleOrg // looking for single org
&& _featureService.IsEnabled(FeatureFlagKeys.AutomaticConfirmUsers) // if autoconfirm is enabled
&& (await _organizationUserRepository.GetByUserIdWithPolicyDetailsAsync(userId, PolicyType.AutomaticUserConfirmation)).Any()) // any auto confirm details associated with user id
{
minStatus = OrganizationUserStatusType.Revoked;
excludedUserTypes = [];
minStatus = OrganizationUserStatusType.Revoked; // all statuses count
excludedUserTypes = []; // no excluded types
}
else
{