Filter ciphers that have password reprompt set when using unlock on autofill via contextMenu

This commit is contained in:
Daniel James Smith 2021-11-05 14:18:59 +01:00
parent d4231589ad
commit d448c402dc
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import { TotpService } from 'jslib-common/abstractions/totp.service';
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
import { CipherRepromptType } from 'jslib-common/enums/cipherRepromptType';
import { EventType } from 'jslib-common/enums/eventType';
import { CipherView } from 'jslib-common/models/view/cipherView';
import LockedVaultPendingNotificationsItem from './models/lockedVaultPendingNotificationsItem';
@ -84,7 +85,7 @@ export default class ContextMenusBackground {
let cipher: CipherView;
if (id === this.noopCommandSuffix) {
const ciphers = await this.cipherService.getAllDecryptedForUrl(tab.url);
cipher = ciphers.length > 0 ? ciphers[0] : null;
cipher = ciphers.find(x => x.reprompt === CipherRepromptType.None);
} else {
const ciphers = await this.cipherService.getAllDecrypted();
cipher = ciphers.find(c => c.id === id);