Fix password re-prompt triggering on non-reprompt items (#1817)

* Fix password re-prompt triggering on non-reprompt items
This commit is contained in:
Oscar Hinton 2021-05-04 19:04:18 +02:00 committed by GitHub
parent cdc71dd661
commit 6e9e0445de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import {
import { ToasterService } from 'angular2-toaster';
import { CipherRepromptType } from 'jslib/enums/cipherRepromptType';
import { CipherType } from 'jslib/enums/cipherType';
import { EventType } from 'jslib/enums/eventType';
@ -46,7 +47,8 @@ export class ActionButtonsComponent {
}
async copy(cipher: CipherView, value: string, typeI18nKey: string, aType: string) {
if (this.passwordRepromptService.protectedFields().includes(aType) && !await this.passwordRepromptService.showPasswordPrompt()) {
if (this.cipher.reprompt !== CipherRepromptType.None && this.passwordRepromptService.protectedFields().includes(aType) &&
!await this.passwordRepromptService.showPasswordPrompt()) {
return;
}