mirror of
https://github.com/bitwarden/android.git
synced 2026-06-02 11:12:00 -05:00
default timeout action should be LOGOUT when using TDE (#1216)
This commit is contained in:
committed by
Álison Fernandes
parent
37fb1fadb8
commit
ab55b5e535
@@ -324,7 +324,21 @@ class SettingsRepositoryImpl(
|
||||
// Set Vault Settings defaults
|
||||
if (!isVaultTimeoutActionSet(userId = userId)) {
|
||||
storeVaultTimeout(userId, VaultTimeout.FifteenMinutes)
|
||||
storeVaultTimeoutAction(userId, VaultTimeoutAction.LOCK)
|
||||
val hasTrustedDeviceEncryption = authDiskSource
|
||||
.userState
|
||||
?.activeAccount
|
||||
?.profile
|
||||
?.userDecryptionOptions
|
||||
?.trustedDeviceUserDecryptionOptions != null
|
||||
storeVaultTimeoutAction(
|
||||
userId = userId,
|
||||
vaultTimeoutAction = if (hasTrustedDeviceEncryption) {
|
||||
// Always logout by default when using TDE
|
||||
VaultTimeoutAction.LOGOUT
|
||||
} else {
|
||||
VaultTimeoutAction.LOCK
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user