-
-
-
+
\ No newline at end of file
diff --git a/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.ts b/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.ts
index e65e9c33f8..c65cbc4f43 100644
--- a/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.ts
+++ b/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.ts
@@ -10,10 +10,10 @@ import { ToastService } from 'src/app/services/toast.service';
export interface WebAuthNOptions {
challenge: string;
- rp: { name: string, id: string; };
- user: { name: string, id: string, displayName: string; };
+ rp: { name: string; id: string };
+ user: { name: string; id: string; displayName: string };
pubKeyCredParams: any;
- authenticatorSelection: { userVerification: string; };
+ authenticatorSelection: { userVerification: string };
timeout: number;
attestation: string;
}
@@ -25,6 +25,7 @@ export interface WebAuthNOptions {
})
export class PasswordlessComponent implements OnInit, OnDestroy {
@Input() public user!: User.AsObject;
+ @Input() public disabled: boolean = true;
public displayedColumns: string[] = ['name', 'state', 'actions'];
private loadingSubject: BehaviorSubject
= new BehaviorSubject(false);
public loading$: Observable = this.loadingSubject.asObservable();
@@ -36,9 +37,7 @@ export class PasswordlessComponent implements OnInit, OnDestroy {
public AuthFactorState: any = AuthFactorState;
public error: string = '';
- constructor(private service: ManagementService,
- private toast: ToastService,
- private dialog: MatDialog) { }
+ constructor(private service: ManagementService, private toast: ToastService, private dialog: MatDialog) {}
public ngOnInit(): void {
this.getPasswordless();
@@ -49,12 +48,15 @@ export class PasswordlessComponent implements OnInit, OnDestroy {
}
public getPasswordless(): void {
- this.service.listHumanPasswordless(this.user.id).then(passwordless => {
- this.dataSource = new MatTableDataSource(passwordless.resultList);
- this.dataSource.sort = this.sort;
- }).catch(error => {
- this.error = error.message;
- });
+ this.service
+ .listHumanPasswordless(this.user.id)
+ .then((passwordless) => {
+ this.dataSource = new MatTableDataSource(passwordless.resultList);
+ this.dataSource.sort = this.sort;
+ })
+ .catch((error) => {
+ this.error = error.message;
+ });
}
public deletePasswordless(id?: string): void {
@@ -68,23 +70,29 @@ export class PasswordlessComponent implements OnInit, OnDestroy {
width: '400px',
});
- dialogRef.afterClosed().subscribe(resp => {
+ dialogRef.afterClosed().subscribe((resp) => {
if (resp && id) {
- this.service.removeHumanPasswordless(id, this.user.id).then(() => {
- this.toast.showInfo('USER.TOAST.PASSWORDLESSREMOVED', true);
- this.getPasswordless();
- }).catch(error => {
- this.toast.showError(error);
- });
+ this.service
+ .removeHumanPasswordless(id, this.user.id)
+ .then(() => {
+ this.toast.showInfo('USER.TOAST.PASSWORDLESSREMOVED', true);
+ this.getPasswordless();
+ })
+ .catch((error) => {
+ this.toast.showError(error);
+ });
}
});
}
public sendPasswordlessRegistration(): void {
- this.service.sendPasswordlessRegistration(this.user.id).then(() => {
- this.toast.showInfo('USER.TOAST.PASSWORDLESSREGISTRATIONSENT');
- }).catch(error => {
- this.toast.showError(error);
- });
+ this.service
+ .sendPasswordlessRegistration(this.user.id)
+ .then(() => {
+ this.toast.showInfo('USER.TOAST.PASSWORDLESSREGISTRATIONSENT');
+ })
+ .catch((error) => {
+ this.toast.showError(error);
+ });
}
}
diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html
index 8d1862eded..b63428a1aa 100644
--- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html
+++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html
@@ -87,7 +87,8 @@
-
+
+