1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 05:00:10 +00:00

Disable prompt

This commit is contained in:
Bernd Schoolmann
2026-01-09 18:14:25 +01:00
parent d11ec791f3
commit 6a857e8286
2 changed files with 35 additions and 35 deletions

View File

@@ -67,33 +67,33 @@ export class DefaultEncryptedMigrationsSchedulerService implements EncryptedMigr
);
// For all accounts, if the auth status changes to unlocked or a sync happens, prompt for migration
this.accountService.accounts$
.pipe(
switchMap((accounts) => {
const userIds = Object.keys(accounts) as UserId[];
// this.accountService.accounts$
// .pipe(
// switchMap((accounts) => {
// const userIds = Object.keys(accounts) as UserId[];
if (userIds.length === 0) {
return of([]);
}
// if (userIds.length === 0) {
// return of([]);
// }
return combineLatest(
userIds.map((userId) =>
combineLatest([
this.authService.authStatusFor$(userId),
this.syncService.lastSync$(userId).pipe(filter((lastSync) => lastSync != null)),
this.url$,
]).pipe(
filter(
([authStatus, _date, url]) =>
authStatus === AuthenticationStatus.Unlocked && VAULT_ROUTES.includes(url),
),
concatMap(() => this.runMigrationsIfNeeded(userId)),
),
),
);
}),
)
.subscribe();
// return combineLatest(
// userIds.map((userId) =>
// combineLatest([
// this.authService.authStatusFor$(userId),
// this.syncService.lastSync$(userId).pipe(filter((lastSync) => lastSync != null)),
// this.url$,
// ]).pipe(
// filter(
// ([authStatus, _date, url]) =>
// authStatus === AuthenticationStatus.Unlocked && VAULT_ROUTES.includes(url),
// ),
// concatMap(() => this.runMigrationsIfNeeded(userId)),
// ),
// ),
// );
// }),
// )
// .subscribe();
}
async runMigrationsIfNeeded(userId: UserId): Promise<void> {

View File

@@ -51,17 +51,17 @@ export class MinimumKdfMigration implements EncryptedMigration {
}
// Only PBKDF2 users below the minimum iteration count need migration
const kdfConfig = await this.kdfConfigService.getKdfConfig(userId);
if (
kdfConfig.kdfType !== KdfType.PBKDF2_SHA256 ||
kdfConfig.iterations >= PBKDF2KdfConfig.ITERATIONS.min
) {
return "noMigrationNeeded";
}
// const kdfConfig = await this.kdfConfigService.getKdfConfig(userId);
// if (
// kdfConfig.kdfType !== KdfType.PBKDF2_SHA256 ||
// kdfConfig.iterations >= PBKDF2KdfConfig.ITERATIONS.min
// ) {
// return "noMigrationNeeded";
// }
if (!(await this.configService.getFeatureFlag(FeatureFlag.ForceUpdateKDFSettings))) {
return "noMigrationNeeded";
}
// if (!(await this.configService.getFeatureFlag(FeatureFlag.ForceUpdateKDFSettings))) {
// return "noMigrationNeeded";
// }
return "needsMigrationWithMasterPassword";
}