mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 05:00:10 +00:00
Disable prompt
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user