1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 15:53:59 +00:00

[PM-20633] rename personal ownership (#5978)

* rename personal ownership

* rename enums, files, tests
This commit is contained in:
Brandon Treston
2025-06-24 10:29:09 -04:00
committed by GitHub
parent 86a4ce5a51
commit 70703cb3b0
11 changed files with 131 additions and 131 deletions

View File

@@ -142,11 +142,11 @@ public class CipherService : ICipherService
}
else
{
var isPersonalVaultRestricted = _featureService.IsEnabled(FeatureFlagKeys.PolicyRequirements)
? (await _policyRequirementQuery.GetAsync<PersonalOwnershipPolicyRequirement>(savingUserId)).State == PersonalOwnershipState.Restricted
: await _policyService.AnyPoliciesApplicableToUserAsync(savingUserId, PolicyType.PersonalOwnership);
var organizationDataOwnershipEnabled = _featureService.IsEnabled(FeatureFlagKeys.PolicyRequirements)
? (await _policyRequirementQuery.GetAsync<OrganizationDataOwnershipPolicyRequirement>(savingUserId)).State == OrganizationDataOwnershipState.Enabled
: await _policyService.AnyPoliciesApplicableToUserAsync(savingUserId, PolicyType.OrganizationDataOwnership);
if (isPersonalVaultRestricted)
if (organizationDataOwnershipEnabled)
{
throw new BadRequestException("Due to an Enterprise Policy, you are restricted from saving items to your personal vault.");
}