1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Removing the isUserAdmin and just using the canAccessImportExport property (#6822)

This commit is contained in:
ttalty
2023-11-13 10:18:21 -05:00
committed by GitHub
parent b528675cf9
commit 9c688ba55f
3 changed files with 15 additions and 4 deletions

View File

@@ -361,7 +361,7 @@ export class ImportComponent implements OnInit, OnDestroy {
fileContents,
this.organizationId,
this.formGroup.controls.targetSelector.value,
this.isUserAdmin(this.organizationId)
this.canAccessImportExport(this.organizationId)
);
//No errors, display success message
@@ -386,6 +386,13 @@ export class ImportComponent implements OnInit, OnDestroy {
return this.organizationService.get(this.organizationId)?.isAdmin;
}
private canAccessImportExport(organizationId?: string): boolean {
if (!organizationId) {
return false;
}
return this.organizationService.get(this.organizationId)?.canAccessImportExport;
}
getFormatInstructionTitle() {
if (this.format == null) {
return null;