1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

Fix isAdmin check (#8432)

This commit is contained in:
Robyn MacCallum 2024-03-22 13:56:42 -04:00 committed by GitHub
parent 78e8f9c587
commit 7df9c597af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
import { Component } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { map } from "rxjs";
import { concatMap } from "rxjs";
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
@ -14,7 +14,9 @@ export class NavigationComponent {
protected readonly logo = SecretsManagerLogo;
protected orgFilter = (org: Organization) => org.canAccessSecretsManager;
protected isAdmin$ = this.route.params.pipe(
map(async (params) => (await this.organizationService.get(params.organizationId))?.isAdmin),
concatMap(
async (params) => (await this.organizationService.get(params.organizationId))?.isAdmin,
),
);
constructor(