1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 13:40:06 +00:00

fixed collections still appearing when no organizations (#18779)

This commit is contained in:
Leslie Xiong
2026-02-05 15:36:33 -05:00
committed by GitHub
parent f010d28492
commit 2b6158668d

View File

@@ -80,6 +80,7 @@ export class VaultFilterComponent implements OnInit {
protected readonly showCollectionsFilter = computed<boolean>(() => {
return (
this.organizations() != null &&
this.nonIndividualVaultOrganizations().length > 0 &&
!this.activeFilter()?.isMyVaultSelected &&
!this.allOrganizationsDisabled()
);
@@ -89,10 +90,14 @@ export class VaultFilterComponent implements OnInit {
if (!this.organizations()) {
return false;
}
const orgs = this.organizations().children.filter((org) => org.node.id !== "MyVault");
const orgs = this.nonIndividualVaultOrganizations();
return orgs.length > 0 && orgs.every((org) => !org.node.enabled);
});
private nonIndividualVaultOrganizations() {
return this.organizations().children.filter((org) => org.node.id !== "MyVault");
}
private async setActivePolicies() {
this.activeOrganizationDataOwnershipPolicy = await firstValueFrom(
this.policyService.policyAppliesToUser$(