mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[bug] Ensure neverLock vaults can be manually locked (#607)
The client side storage restructuring work incorrectly checks if a vault has ever been unlocked to determine neverLock scenerios, but production does the opposite. This creates an inability to never manually lock neverLock vaults. This commit sets that condition back to the way it was.
This commit is contained in:
@@ -53,7 +53,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
|
||||
async isLocked(userId?: string): Promise<boolean> {
|
||||
const neverLock =
|
||||
(await this.cryptoService.hasKeyStored(KeySuffixOptions.Auto, userId)) &&
|
||||
(await this.stateService.getEverBeenUnlocked({ userId: userId }));
|
||||
!(await this.stateService.getEverBeenUnlocked({ userId: userId }));
|
||||
if (neverLock) {
|
||||
// TODO: This also _sets_ the key so when we check memory in the next line it finds a key.
|
||||
// We should refactor here.
|
||||
|
||||
Reference in New Issue
Block a user