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:
parent
78e8f9c587
commit
7df9c597af
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user