1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +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

@@ -111,7 +111,7 @@ export class ImportService implements ImportServiceAbstraction {
fileContents: string,
organizationId: string = null,
selectedImportTarget: string = null,
isUserAdmin: boolean
canAccessImportExport: boolean
): Promise<ImportResult> {
let importResult: ImportResult;
try {
@@ -147,7 +147,11 @@ export class ImportService implements ImportServiceAbstraction {
}
}
if (organizationId && Utils.isNullOrWhitespace(selectedImportTarget) && !isUserAdmin) {
if (
organizationId &&
Utils.isNullOrWhitespace(selectedImportTarget) &&
!canAccessImportExport
) {
const hasUnassignedCollections = importResult.ciphers.some(
(c) => !Array.isArray(c.collectionIds) || c.collectionIds.length == 0
);