Enforce mandatory session verification only for new logins (#2811)
* Enforce mandatory session verification only for new logins - Creates `AppMigration` base interface as a way to isolate migration logic, app migrations must implement this interface. - Creates `AppMigration01` with the existing logs removal migration and `AppMigration02` with the logic to allow existing sessions to skip verification. - Add `DefaultSessionPreferencesStoreFactory.remove(sessionId)` to allow a ephemeral session store access to exist outside the `SessionScope` for this new migration. * Fix tests * Add more tests. This also includes creating several abstractions. * Review changes. - Make `orderedMigrations` a class property, `migrations` just a constructor parameter to avoid incorrect usages. - Create `lastMigration` property too, use it instead of `MIGRATION_VERSION`.
This commit is contained in:
parent
0359504fa9
commit
9aadec8435
30 changed files with 370 additions and 51 deletions
|
|
@ -18,9 +18,10 @@ package io.element.android.features.rageshake.test.logs
|
|||
|
||||
import io.element.android.features.rageshake.api.logs.LogFilesRemover
|
||||
import io.element.android.tests.testutils.lambda.LambdaNoParamRecorder
|
||||
import io.element.android.tests.testutils.lambda.lambdaRecorder
|
||||
|
||||
class FakeLogFilesRemover(
|
||||
private val performLambda: LambdaNoParamRecorder<Unit>,
|
||||
var performLambda: LambdaNoParamRecorder<Unit> = lambdaRecorder { -> },
|
||||
) : LogFilesRemover {
|
||||
override suspend fun perform() {
|
||||
performLambda()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue