mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
[AC-1492] Split export service (#7462)
* Split export service into vault and org export service * Changed CLI logic to use split export logic * correct unit tests * Created individual export service, export service making the calls for org and ind vault * Improved code readability * Merged PasswordProtectedExport with Export methods to simplify calls * Some small refactor * [AC-1492] Managed collections export (#7556) * Added managed collections export method Added logic to show orgs on export that the user can export from * Merge branch 'tools/AC-1492/split-export-services' into tools/AC-1492/export-flexible-collections # Conflicts: # apps/web/src/app/admin-console/organizations/tools/vault-export/org-vault-export.component.ts # apps/web/src/app/tools/vault-export/export.component.ts * Change export to use new organization.flexiblecollection flag * Little refactor changing parameter names and reduzing the size of export.component.ts ngOnInit * Removed unused service from export constructor and removed unnecessary default value from org export service parameter * Simplified organizations selection for vault export to only verify if it has flexiblecollections * removed unecessary services from ExportComponent constructor on popup * Fixed possible race condition on managed export
This commit is contained in:
@@ -123,6 +123,10 @@ import { SyncNotifierService } from "@bitwarden/common/vault/services/sync/sync-
|
||||
import { SyncService } from "@bitwarden/common/vault/services/sync/sync.service";
|
||||
import { TotpService } from "@bitwarden/common/vault/services/totp.service";
|
||||
import {
|
||||
IndividualVaultExportService,
|
||||
IndividualVaultExportServiceAbstraction,
|
||||
OrganizationVaultExportService,
|
||||
OrganizationVaultExportServiceAbstraction,
|
||||
VaultExportService,
|
||||
VaultExportServiceAbstraction,
|
||||
} from "@bitwarden/exporter/vault-export";
|
||||
@@ -253,6 +257,8 @@ export default class MainBackground {
|
||||
derivedStateProvider: DerivedStateProvider;
|
||||
stateProvider: StateProvider;
|
||||
fido2Service: Fido2ServiceAbstraction;
|
||||
individualVaultExportService: IndividualVaultExportServiceAbstraction;
|
||||
organizationVaultExportService: OrganizationVaultExportServiceAbstraction;
|
||||
|
||||
// Passed to the popup for Safari to workaround issues with theming, downloading, etc.
|
||||
backgroundWindow = window;
|
||||
@@ -635,14 +641,28 @@ export default class MainBackground {
|
||||
this.cryptoService,
|
||||
);
|
||||
|
||||
this.exportService = new VaultExportService(
|
||||
this.individualVaultExportService = new IndividualVaultExportService(
|
||||
this.folderService,
|
||||
this.cipherService,
|
||||
this.cryptoService,
|
||||
this.cryptoFunctionService,
|
||||
this.stateService,
|
||||
);
|
||||
|
||||
this.organizationVaultExportService = new OrganizationVaultExportService(
|
||||
this.cipherService,
|
||||
this.apiService,
|
||||
this.cryptoService,
|
||||
this.cryptoFunctionService,
|
||||
this.stateService,
|
||||
this.collectionService,
|
||||
);
|
||||
|
||||
this.exportService = new VaultExportService(
|
||||
this.individualVaultExportService,
|
||||
this.organizationVaultExportService,
|
||||
);
|
||||
|
||||
this.notificationsService = new NotificationsService(
|
||||
this.logService,
|
||||
this.syncService,
|
||||
|
||||
Reference in New Issue
Block a user