mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-21611] Require userId on KeyService clear methods (#14788)
This commit is contained in:
@@ -480,7 +480,8 @@ export class AccountSecurityComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
await this.vaultNudgesService.dismissNudge(NudgeType.AccountSecurity, userId);
|
||||
} else {
|
||||
await this.vaultTimeoutSettingsService.clear();
|
||||
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||
await this.vaultTimeoutSettingsService.clear(userId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -874,7 +874,7 @@ export class ServiceContainer {
|
||||
const userId = await firstValueFrom(getUserId(this.accountService.activeAccount$));
|
||||
await Promise.all([
|
||||
this.eventUploadService.uploadEvents(userId as UserId),
|
||||
this.keyService.clearKeys(),
|
||||
this.keyService.clearKeys(userId),
|
||||
this.cipherService.clear(userId),
|
||||
this.folderService.clear(userId),
|
||||
this.collectionService.clear(userId),
|
||||
|
||||
@@ -506,7 +506,8 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
await this.updateRequirePasswordOnStart();
|
||||
}
|
||||
|
||||
await this.vaultTimeoutSettingsService.clear();
|
||||
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||
await this.vaultTimeoutSettingsService.clear(userId);
|
||||
}
|
||||
|
||||
this.messagingService.send("redrawMenu");
|
||||
|
||||
@@ -282,7 +282,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
||||
);
|
||||
|
||||
await Promise.all([
|
||||
this.keyService.clearKeys(),
|
||||
this.keyService.clearKeys(userId),
|
||||
this.cipherService.clear(userId),
|
||||
this.folderService.clear(userId),
|
||||
this.collectionService.clear(userId),
|
||||
|
||||
Reference in New Issue
Block a user