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

Resolve the Unauthorized issue (#12262)

This commit is contained in:
cyprain-okeke
2024-12-06 15:17:48 +01:00
committed by GitHub
parent 8d68a2dd58
commit f95cc7b82c
2 changed files with 7 additions and 2 deletions

View File

@@ -210,7 +210,10 @@ export class VaultComponent implements OnInit, OnDestroy {
protected organizationsPaymentStatus$: Observable<FreeTrial[]> = combineLatest([
this.organizationService.organizations$.pipe(
map((organizations) => organizations?.filter((org) => org.isOwner) ?? []),
map(
(organizations) =>
organizations?.filter((org) => org.isOwner && org.canViewBillingHistory) ?? [],
),
),
this.hasSubscription$,
]).pipe(

View File

@@ -592,7 +592,9 @@ export class VaultComponent implements OnInit, OnDestroy {
organization$,
this.hasSubscription$.pipe(filter((hasSubscription) => hasSubscription !== null)),
]).pipe(
filter(([org, hasSubscription]) => org.isOwner && hasSubscription),
filter(
([org, hasSubscription]) => org.isOwner && hasSubscription && org.canViewBillingHistory,
),
switchMap(([org]) =>
combineLatest([
of(org),