mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
PM-9632 added MP reprompt check to edit button in view-v2 (#10104)
This commit is contained in:
@@ -102,7 +102,20 @@ export class ViewV2Component {
|
|||||||
return await cipher.decrypt(await this.cipherService.getKeyForCipherKeyDecryption(cipher));
|
return await cipher.decrypt(await this.cipherService.getKeyForCipherKeyDecryption(cipher));
|
||||||
}
|
}
|
||||||
|
|
||||||
editCipher() {
|
async checkForPasswordReprompt() {
|
||||||
|
this.passwordReprompted =
|
||||||
|
this.passwordReprompted ||
|
||||||
|
(await this.passwordRepromptService.passwordRepromptCheck(this.cipher));
|
||||||
|
if (!this.passwordReprompted) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
async editCipher() {
|
||||||
|
if (!(await this.checkForPasswordReprompt())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.cipher.isDeleted) {
|
if (this.cipher.isDeleted) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -113,10 +126,7 @@ export class ViewV2Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete = async (): Promise<boolean> => {
|
delete = async (): Promise<boolean> => {
|
||||||
this.passwordReprompted =
|
if (!(await this.checkForPasswordReprompt())) {
|
||||||
this.passwordReprompted ||
|
|
||||||
(await this.passwordRepromptService.passwordRepromptCheck(this.cipher));
|
|
||||||
if (!this.passwordReprompted) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user