mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 12:13:45 +00:00
[PM-18721] update method name, add controls dynamically, fix typos
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
<bit-hint>
|
||||
{{
|
||||
"masterPassHintText"
|
||||
| i18n: formGroup.value.newPasswordHint.length : maxHintLength.toString()
|
||||
| i18n: formGroup.value.newPasswordHint.length.toString() : maxHintLength.toString()
|
||||
}}
|
||||
</bit-hint>
|
||||
</bit-form-field>
|
||||
|
||||
@@ -107,11 +107,11 @@ interface InputPasswordForm {
|
||||
FormFieldModule,
|
||||
IconButtonModule,
|
||||
InputModule,
|
||||
ReactiveFormsModule,
|
||||
SharedModule,
|
||||
JslibModule,
|
||||
PasswordCalloutComponent,
|
||||
PasswordStrengthV2Component,
|
||||
JslibModule,
|
||||
ReactiveFormsModule,
|
||||
SharedModule,
|
||||
],
|
||||
})
|
||||
export class InputPasswordComponent implements OnInit {
|
||||
@@ -148,11 +148,6 @@ export class InputPasswordComponent implements OnInit {
|
||||
Validators.minLength(this.minPasswordLength),
|
||||
]),
|
||||
newPasswordConfirm: this.formBuilder.nonNullable.control("", Validators.required),
|
||||
newPasswordHint: this.formBuilder.nonNullable.control("", [
|
||||
Validators.minLength(this.minHintLength),
|
||||
Validators.maxLength(this.maxHintLength),
|
||||
]),
|
||||
checkForBreaches: this.formBuilder.nonNullable.control(true),
|
||||
},
|
||||
{
|
||||
validators: [
|
||||
@@ -200,12 +195,11 @@ export class InputPasswordComponent implements OnInit {
|
||||
if (this.flow !== InputPasswordFlow.ChangePasswordDelegation) {
|
||||
this.formGroup.addControl(
|
||||
"newPasswordHint",
|
||||
new FormControl("", [
|
||||
this.formBuilder.nonNullable.control("", [
|
||||
Validators.minLength(this.minHintLength),
|
||||
Validators.maxLength(this.maxHintLength),
|
||||
]) as FormControl<string>,
|
||||
]),
|
||||
);
|
||||
this.formGroup.addControl("checkForBreaches", new FormControl(true) as FormControl<boolean>);
|
||||
|
||||
this.formGroup.addValidators([
|
||||
compareInputs(
|
||||
@@ -215,6 +209,8 @@ export class InputPasswordComponent implements OnInit {
|
||||
this.i18nService.t("hintEqualsPassword"),
|
||||
),
|
||||
]);
|
||||
|
||||
this.formGroup.addControl("checkForBreaches", this.formBuilder.nonNullable.control(true));
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
@@ -57,7 +57,8 @@ the `email` and/or `userId` is present in certain flows, while not present in ot
|
||||
|
||||
- `email` - allows the `InputPasswordComponent` to generate a master key
|
||||
- `userId` - allows the `InputPasswordComponent` to do things like get the user's `kdfConfig`,
|
||||
decrypt the user key, and perform validation prior to user a key rotation on the parent
|
||||
verify that a current password is correct, and perform validation prior to user key rotation on
|
||||
the parent
|
||||
|
||||
**Optional**
|
||||
|
||||
@@ -124,7 +125,7 @@ Used in scenarios where we do have an existing and authed user, and thus an acti
|
||||
|
||||
**`ChangePassword`**
|
||||
|
||||
Used in scenarios where a we simply want simply offer the user the ability to change their password:
|
||||
Used in scenarios where we simply want to offer the user the ability to change their password:
|
||||
|
||||
- User clicks an org email invite link an logs in with their password which does not meet the org's
|
||||
policy requirements
|
||||
@@ -251,7 +252,7 @@ export interface PasswordInputResult {
|
||||
Some of our set/change password flows use dialogs, such as Emergency Access Takeover and Account
|
||||
Recovery. These are covered by the `ChangePasswordDelegation` flow. Because dialogs have their own
|
||||
buttons, we don't want to display an additional Submit button in the `InputPasswordComponent` when
|
||||
embedded a dialog.
|
||||
embedded in a dialog.
|
||||
|
||||
Therefore we do the following:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user