[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:
parent
c7ccb997bd
commit
957e010036
|
@ -53,7 +53,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
|
||||||
async isLocked(userId?: string): Promise<boolean> {
|
async isLocked(userId?: string): Promise<boolean> {
|
||||||
const neverLock =
|
const neverLock =
|
||||||
(await this.cryptoService.hasKeyStored(KeySuffixOptions.Auto, userId)) &&
|
(await this.cryptoService.hasKeyStored(KeySuffixOptions.Auto, userId)) &&
|
||||||
(await this.stateService.getEverBeenUnlocked({ userId: userId }));
|
!(await this.stateService.getEverBeenUnlocked({ userId: userId }));
|
||||||
if (neverLock) {
|
if (neverLock) {
|
||||||
// TODO: This also _sets_ the key so when we check memory in the next line it finds a key.
|
// TODO: This also _sets_ the key so when we check memory in the next line it finds a key.
|
||||||
// We should refactor here.
|
// We should refactor here.
|
||||||
|
|
Loading…
Reference in New Issue