mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-25918] Move required userId for export request up to component/command level (#14391)
* Require userId for KdfConfigService * cleanup KdfConfigService unit tests * Move required userId for export request up to component/command level * Fix service creation/dependency injection * Revert changes to kdf-config.service.spec cause by a bad rebase * Fix linting issue * Fix tests caused by bad rebase * Validate provided userId to equal the current active user * Create tests for vault-export.service Deleted old tests which since have been replaced with individual-vault-export.service.spec.ts --------- Co-authored-by: Thomas Avery <tavery@bitwarden.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a77fb354d8
commit
94764467e8
@@ -14,6 +14,7 @@ import {
|
||||
import { ReactiveFormsModule, UntypedFormBuilder, Validators } from "@angular/forms";
|
||||
import {
|
||||
combineLatest,
|
||||
firstValueFrom,
|
||||
map,
|
||||
merge,
|
||||
Observable,
|
||||
@@ -460,9 +461,11 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
}
|
||||
|
||||
protected async getExportData(): Promise<ExportedVault> {
|
||||
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||
return Utils.isNullOrWhitespace(this.organizationId)
|
||||
? this.exportService.getExport(this.format, this.filePassword)
|
||||
? this.exportService.getExport(userId, this.format, this.filePassword)
|
||||
: this.exportService.getOrganizationExport(
|
||||
userId,
|
||||
this.organizationId,
|
||||
this.format,
|
||||
this.filePassword,
|
||||
|
||||
Reference in New Issue
Block a user