mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
prompt for master password first before confirming archive (#16892)
This commit is contained in:
@@ -692,6 +692,12 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
}
|
}
|
||||||
|
|
||||||
async archive(cipher: C) {
|
async archive(cipher: C) {
|
||||||
|
const repromptPassed = await this.passwordRepromptService.passwordRepromptCheck(cipher);
|
||||||
|
|
||||||
|
if (!repromptPassed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "archiveItem" },
|
title: { key: "archiveItem" },
|
||||||
content: { key: "archiveItemConfirmDesc" },
|
content: { key: "archiveItemConfirmDesc" },
|
||||||
@@ -702,10 +708,6 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const repromptPassed = await this.passwordRepromptService.passwordRepromptCheck(cipher);
|
|
||||||
if (!repromptPassed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const activeUserId = await firstValueFrom(this.userId$);
|
const activeUserId = await firstValueFrom(this.userId$);
|
||||||
try {
|
try {
|
||||||
await this.cipherArchiveService.archiveWithServer(cipher.id as CipherId, activeUserId);
|
await this.cipherArchiveService.archiveWithServer(cipher.id as CipherId, activeUserId);
|
||||||
@@ -724,6 +726,10 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
}
|
}
|
||||||
|
|
||||||
async bulkArchive(ciphers: C[]) {
|
async bulkArchive(ciphers: C[]) {
|
||||||
|
if (!(await this.repromptCipher(ciphers))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
title: { key: "archiveBulkItems" },
|
title: { key: "archiveBulkItems" },
|
||||||
content: { key: "archiveBulkItemsConfirmDesc" },
|
content: { key: "archiveBulkItemsConfirmDesc" },
|
||||||
@@ -734,10 +740,6 @@ export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestr
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(await this.repromptCipher(ciphers))) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const activeUserId = await firstValueFrom(this.userId$);
|
const activeUserId = await firstValueFrom(this.userId$);
|
||||||
const cipherIds = ciphers.map((c) => c.id as CipherId);
|
const cipherIds = ciphers.map((c) => c.id as CipherId);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user