diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index 70149cc002..ba32a27aed 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -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; } diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 8370b78cdc..cfeafbf032 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -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; }