mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 12:13:45 +00:00
feat(change-password-component): Change Password Update [18720] - Undid some changes because they will be conflicts later on.
This commit is contained in:
@@ -2395,6 +2395,12 @@
|
||||
"updateWeakMasterPasswordWarning": {
|
||||
"message": "Your master password does not meet one or more of your organization policies. In order to access the vault, you must update your master password now. Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour."
|
||||
},
|
||||
"accountRecoveryUpdateMasterPasswordSubtitle": {
|
||||
"message": "Change your master password to complete account recovery."
|
||||
},
|
||||
"updateMasterPasswordSubtitle": {
|
||||
"message": "Your master password does not meet this organization’s requirements. Change your master password to continue."
|
||||
},
|
||||
"tdeDisabledMasterPasswordRequired": {
|
||||
"message": "Your organization has disabled trusted device encryption. Please set a master password to access your vault."
|
||||
},
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
[policy]="masterPasswordPolicyOptions"
|
||||
></auth-password-callout>
|
||||
|
||||
<bit-form-field *ngIf="isChangePasswordFlow()">
|
||||
<bit-form-field
|
||||
*ngIf="
|
||||
flow === InputPasswordFlow.ChangePassword ||
|
||||
flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
|
||||
"
|
||||
>
|
||||
<bit-label>{{ "currentMasterPass" | i18n }}</bit-label>
|
||||
<input
|
||||
id="input-password-form_current-password"
|
||||
|
||||
@@ -263,7 +263,10 @@ export class InputPasswordComponent implements OnInit {
|
||||
}
|
||||
|
||||
// 2. Verify current password is correct (if necessary)
|
||||
if (this.isChangePasswordFlow()) {
|
||||
if (
|
||||
this.flow === InputPasswordFlow.ChangePassword ||
|
||||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
|
||||
) {
|
||||
const currentPasswordVerified = await this.verifyCurrentPassword(
|
||||
currentPassword,
|
||||
this.kdfConfig,
|
||||
@@ -311,7 +314,10 @@ export class InputPasswordComponent implements OnInit {
|
||||
kdfConfig: this.kdfConfig,
|
||||
};
|
||||
|
||||
if (this.isChangePasswordFlow()) {
|
||||
if (
|
||||
this.flow === InputPasswordFlow.ChangePassword ||
|
||||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
|
||||
) {
|
||||
const currentMasterKey = await this.keyService.makeMasterKey(
|
||||
currentPassword,
|
||||
this.email,
|
||||
@@ -545,11 +551,4 @@ export class InputPasswordComponent implements OnInit {
|
||||
protected getPasswordStrengthScore(score: PasswordStrengthScore) {
|
||||
this.passwordStrengthScore = score;
|
||||
}
|
||||
|
||||
protected isChangePasswordFlow(): boolean {
|
||||
return (
|
||||
this.flow === InputPasswordFlow.ChangePassword ||
|
||||
this.flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user