From 522e3bb939664d5fc5ace9b7e25aeb1c6d9ba1b8 Mon Sep 17 00:00:00 2001 From: David Perez Date: Tue, 27 Aug 2024 08:54:51 -0500 Subject: [PATCH] PM-11354: TDE unlock since we already have the correct key from the identity service (#3835) --- .../bitwarden/data/auth/repository/AuthRepositoryImpl.kt | 1 - .../bitwarden/data/auth/repository/AuthRepositoryTest.kt | 4 ---- 2 files changed, 5 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt b/app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt index b897e9176..ca05cb3b5 100644 --- a/app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt +++ b/app/src/main/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt @@ -554,7 +554,6 @@ class AuthRepositoryImpl( ) } - authDiskSource.storeUserKey(userId = userId, userKey = asymmetricalKey) vaultRepository.syncIfNecessary() return LoginResult.Success } diff --git a/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt index 1fadd5c32..f09a992d1 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt @@ -1346,7 +1346,6 @@ class AuthRepositoryTest { ) vaultRepository.syncIfNecessary() } - fakeAuthDiskSource.assertUserKey(userId = USER_ID_1, userKey = asymmetricalKey) assertEquals(LoginResult.Success, result) } @@ -1392,12 +1391,9 @@ class AuthRepositoryTest { organizationKeys = orgKeys, ) } - coVerify(exactly = 0) { vaultRepository.syncIfNecessary() } - - fakeAuthDiskSource.assertUserKey(userId = USER_ID_1, userKey = null) assertEquals(LoginResult.Error(errorMessage = null), result) }