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