1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-10 13:23:39 +00:00

Additional logic around filter display (#1951)

This commit is contained in:
mp-bw
2022-06-14 13:02:03 -04:00
committed by GitHub
parent e51233bf9b
commit 448758a697
4 changed files with 144 additions and 154 deletions

View File

@@ -249,6 +249,12 @@ namespace Bit.Core.Services
public async Task<bool> ShouldShowVaultFilterAsync()
{
var personalOwnershipPolicyApplies = await PolicyAppliesToUser(PolicyType.PersonalOwnership);
var singleOrgPolicyApplies = await PolicyAppliesToUser(PolicyType.OnlyOrg);
if (personalOwnershipPolicyApplies && singleOrgPolicyApplies)
{
return false;
}
var organizations = await _organizationService.GetAllAsync();
return organizations?.Any() ?? false;
}