mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-02 18:17:46 +01:00
PM-3451 - Update password reprompt logic checks to ensure we have an existing cipher in the add/edit flows to avoid showing the MP reprompt in new cipher scenarios (#6031)
This commit is contained in:
parent
3a2d89c948
commit
993f37fbae
@ -604,7 +604,14 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
|
||||
async editCipherId(id: string) {
|
||||
const cipher = await this.cipherService.get(id);
|
||||
if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) {
|
||||
// if cipher exists (cipher is null when new) and MP reprompt
|
||||
// is on for this cipher, then show password reprompt
|
||||
if (
|
||||
cipher &&
|
||||
cipher.reprompt !== 0 &&
|
||||
!(await this.passwordRepromptService.showPasswordPrompt())
|
||||
) {
|
||||
// didn't pass password prompt, so don't open add / edit modal
|
||||
this.go({ cipherId: null, itemId: null });
|
||||
return;
|
||||
}
|
||||
|
@ -600,7 +600,14 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
additionalComponentParameters?: (comp: AddEditComponent) => void
|
||||
) {
|
||||
const cipher = await this.cipherService.get(cipherId);
|
||||
if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) {
|
||||
// if cipher exists (cipher is null when new) and MP reprompt
|
||||
// is on for this cipher, then show password reprompt
|
||||
if (
|
||||
cipher &&
|
||||
cipher.reprompt !== 0 &&
|
||||
!(await this.passwordRepromptService.showPasswordPrompt())
|
||||
) {
|
||||
// didn't pass password prompt, so don't open add / edit modal
|
||||
this.go({ cipherId: null, itemId: null });
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user