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 00e26b305d..70149cc002 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -498,6 +498,11 @@ export class VaultComponent implements OnInit, OnDestroy { } async editCipherAttachments(cipher: CipherView) { + if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) { + this.go({ cipherId: null, itemId: null }); + return; + } + const canAccessPremium = await this.stateService.getCanAccessPremium(); if (cipher.organizationId == null && !canAccessPremium) { this.messagingService.send("premiumRequired"); @@ -539,6 +544,10 @@ export class VaultComponent implements OnInit, OnDestroy { } async shareCipher(cipher: CipherView) { + if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) { + this.go({ cipherId: null, itemId: null }); + return; + } const [modal] = await this.modalService.openViewRef( ShareComponent, this.shareModalRef, @@ -595,11 +604,9 @@ export class VaultComponent implements OnInit, OnDestroy { async editCipherId(id: string) { const cipher = await this.cipherService.get(id); - if (cipher != null && cipher.reprompt != 0) { - if (!(await this.passwordRepromptService.showPasswordPrompt())) { - this.go({ cipherId: null, itemId: null }); - return; - } + if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) { + this.go({ cipherId: null, itemId: null }); + return; } const [modal, childComponent] = await this.modalService.openViewRef( 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 63f92e64ea..8370b78cdc 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -517,6 +517,11 @@ export class VaultComponent implements OnInit, OnDestroy { } async editCipherAttachments(cipher: CipherView) { + if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) { + this.go({ cipherId: null, itemId: null }); + return; + } + if (this.organization.maxStorageGb == null || this.organization.maxStorageGb === 0) { this.messagingService.send("upgradeOrganization", { organizationId: cipher.organizationId }); return; @@ -595,11 +600,9 @@ export class VaultComponent implements OnInit, OnDestroy { additionalComponentParameters?: (comp: AddEditComponent) => void ) { const cipher = await this.cipherService.get(cipherId); - if (cipher != null && cipher.reprompt != 0) { - if (!(await this.passwordRepromptService.showPasswordPrompt())) { - this.go({ cipherId: null, itemId: null }); - return; - } + if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) { + this.go({ cipherId: null, itemId: null }); + return; } const defaultComponentParameters = (comp: AddEditComponent) => {