feat: DSC enrollment + MFA controls, user CRUD UX, auth error hardening
- DSC module: list/enroll/revoke dialogs and dsc.service (m_bank_user_dsc API) - Access control: DSC + MFA toggles via disable-confirm-dialog - Two-factor auth: expanded UX (DSC + OTP flows) - Users: create/edit form polish, success snackbar on edit, DSC widget retained only inside dsc/ (removed from view-user) - Auth: X-Requested-With added globally; error handler null-safe on empty 500 bodies Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
3b752dc6ae
commit
09fab88451
@@ -86,7 +86,7 @@
|
||||
formControlName="email"
|
||||
placeholder="name@example.com"
|
||||
/>
|
||||
@if (userForm.controls.email.hasError('email')) {
|
||||
@if (userForm.controls.email.hasError('email') || userForm.controls.email.hasError('pattern')) {
|
||||
<mat-error
|
||||
>{{ 'labels.inputs.Email' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.invalid' | translate }}</strong></mat-error
|
||||
|
||||
@@ -107,7 +107,8 @@ export class CreateUserComponent implements OnInit, AfterViewInit {
|
||||
'',
|
||||
[
|
||||
Validators.required,
|
||||
Validators.email
|
||||
Validators.email,
|
||||
Validators.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)
|
||||
]
|
||||
],
|
||||
mobileNo: [
|
||||
@@ -169,7 +170,8 @@ export class CreateUserComponent implements OnInit, AfterViewInit {
|
||||
this.userForm.removeControl('repeatPassword');
|
||||
this.userForm.get('email').setValidators([
|
||||
Validators.required,
|
||||
Validators.email
|
||||
Validators.email,
|
||||
Validators.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)
|
||||
]);
|
||||
} else {
|
||||
this.userForm.addControl('password', new UntypedFormControl('', this.passwordsUtility.getPasswordValidators()));
|
||||
@@ -180,7 +182,10 @@ export class CreateUserComponent implements OnInit, AfterViewInit {
|
||||
this.passwordsUtility.confirmPassword('password')
|
||||
])
|
||||
);
|
||||
this.userForm.get('email').setValidators([Validators.email]);
|
||||
this.userForm.get('email').setValidators([
|
||||
Validators.email,
|
||||
Validators.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)
|
||||
]);
|
||||
}
|
||||
this.userForm.get('email').updateValueAndValidity();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user