feat(actions): local users (#5089)

Actions are extended to to local users. It's possible to run custom code during registration and authentication of local users.
This commit is contained in:
Silvan
2023-01-25 14:08:01 +01:00
committed by GitHub
parent 19621acfd3
commit c54ddc71a2
48 changed files with 704 additions and 188 deletions

View File

@@ -202,7 +202,6 @@ export class AppComponent implements OnDestroy {
.getActiveOrg()
.then(async (org) => {
this.org = org;
// TODO add when console storage is implemented
// this.startIntroWorkflow();
})

View File

@@ -6,7 +6,13 @@
<p class="desc cnsl-secondary-text">{{ 'USER.MFA.DIALOG.ADD_MFA_DESCRIPTION' | translate }}</p>
<div class="type-selection">
<button mat-raised-button color="primary" [disabled]="data.otpDisabled" (click)="selectType(AuthFactorType.OTP)">
<button
mat-raised-button
color="primary"
[disabled]="data.otpDisabled$ | async"
(click)="selectType(AuthFactorType.OTP)"
data-e2e="add-factor-otp"
>
<div class="otp-btn">
<mat-icon class="icon" svgIcon="mdi_radar"></mat-icon>
<span>{{ 'USER.MFA.OTP' | translate }}</span>

View File

@@ -37,7 +37,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
public AuthFactorState: any = AuthFactorState;
public error: string = '';
public otpAvailable: boolean = false;
public otpDisabled$ = new BehaviorSubject<boolean>(true);
constructor(private service: GrpcAuthService, private toast: ToastService, private dialog: MatDialog) {}
@@ -52,7 +52,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
public addAuthFactor(): void {
const dialogRef = this.dialog.open(AuthFactorDialogComponent, {
data: {
otpDisabled: !this.otpAvailable,
otpDisabled$: this.otpDisabled$,
},
});
@@ -71,7 +71,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
const index = list.findIndex((mfa) => mfa.otp);
if (index === -1) {
this.otpAvailable = true;
this.otpDisabled$.next(false);
}
})
.catch((error) => {