Skip to content

Commit

Permalink
Resolve the Unauthorized issue (#12262)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyprain-okeke authored Dec 6, 2024
1 parent 8d68a2d commit f95cc7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/web/src/app/vault/individual-vault/vault.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/vault/org-vault/vault.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit f95cc7b

Please sign in to comment.