1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 12:43:14 +00:00

Cleaned up accept org user command tests

This commit is contained in:
Jared McCannon
2025-12-01 10:24:38 -06:00
parent 4bea324503
commit f5d03068cb
2 changed files with 29 additions and 128 deletions

View File

@@ -92,12 +92,12 @@ public class PolicyService : IPolicyService
OrganizationUserType[] excludedUserTypes;
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
if (policyType == PolicyType.SingleOrg
&& _featureService.IsEnabled(FeatureFlagKeys.AutomaticConfirmUsers)
&& (await _organizationUserRepository.GetByUserIdWithPolicyDetailsAsync(userId, PolicyType.AutomaticUserConfirmation)).Any())
{
minStatus = OrganizationUserStatusType.Revoked; // all statuses count
excludedUserTypes = []; // no excluded types
minStatus = OrganizationUserStatusType.Revoked;
excludedUserTypes = [];
}
else
{