1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 03:33:30 +00:00

[PM-27086] refactor flag logic to only check flag value in one location

This commit is contained in:
rr-bw
2025-12-17 14:32:41 -08:00
parent 44d5bfaad3
commit 2dd1ed2b86
3 changed files with 13 additions and 6 deletions

View File

@@ -377,6 +377,7 @@ export class InputPasswordComponent implements OnInit {
salt,
newPasswordHint,
rotateUserKey: this.formGroup.controls.rotateUserKey?.value ?? false,
newApisFlagEnabled, // To be removed in PM-28143
};
// 5. Emit and return PasswordInputResult object
@@ -411,6 +412,7 @@ export class InputPasswordComponent implements OnInit {
newLocalMasterKeyHash,
newPasswordHint,
kdfConfig: this.kdfConfig,
newApisFlagEnabled,
};
if (

View File

@@ -10,6 +10,14 @@ export interface PasswordInputResult {
newPasswordHint?: string;
rotateUserKey?: boolean;
/**
* Temporary property that persists the flag state through the entire set/change password process.
* Consumers will use this value instead of re-checking the flag state via ConfigService themselves.
*
* To be removed in PM-28143
*/
newApisFlagEnabled: boolean;
// The deprecated properties below will be removed in PM-28143: https://bitwarden.atlassian.net/browse/PM-28143
/** @deprecated This low-level cryptographic state will be removed. It will be replaced by high level calls to masterpassword service, in the consumers of this interface. */