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
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Copyright since 2025 Mifos Initiative
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { Component, inject } from '@angular/core';
|
||||
import {
|
||||
MAT_DIALOG_DATA,
|
||||
MatDialogRef,
|
||||
MatDialogTitle,
|
||||
MatDialogContent,
|
||||
MatDialogActions
|
||||
} from '@angular/material/dialog';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
export interface DisableConfirmDialogData {
|
||||
/** Heading shown at the top, e.g. "Disable SMS OTP". */
|
||||
title: string;
|
||||
/** Body paragraph explaining the impact. */
|
||||
message: string;
|
||||
/** Optional muted line shown below the message (the destination being disabled). */
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-disable-confirm-dialog',
|
||||
templateUrl: './disable-confirm-dialog.component.html',
|
||||
styleUrls: ['./disable-confirm-dialog.component.scss'],
|
||||
imports: [
|
||||
MatDialogTitle,
|
||||
MatDialogContent,
|
||||
MatDialogActions,
|
||||
MatButton,
|
||||
FaIconComponent
|
||||
]
|
||||
})
|
||||
export class DisableConfirmDialogComponent {
|
||||
data = inject<DisableConfirmDialogData>(MAT_DIALOG_DATA);
|
||||
private dialogRef = inject<MatDialogRef<DisableConfirmDialogComponent>>(MatDialogRef);
|
||||
|
||||
cancel(): void {
|
||||
this.dialogRef.close({ confirmed: false });
|
||||
}
|
||||
|
||||
confirm(): void {
|
||||
this.dialogRef.close({ confirmed: true });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user