diff --git a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.html b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.html index a62619a0c8..597fdbc7bb 100644 --- a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.html +++ b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.html @@ -1,7 +1,8 @@
-
diff --git a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts index 55788d632e..fc019bd83b 100644 --- a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts +++ b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts @@ -16,25 +16,20 @@ export class DetailFormComponent implements OnDestroy, OnChanges { @Input() public preferredLoginName: string = ''; @Input() public username!: string; @Input() public user!: Human.AsObject; - @Input() public disabled: boolean = false; + @Input() public disabled: boolean = true; @Input() public genders: Gender[] = []; @Input() public languages: string[] = ['de', 'en']; @Output() public submitData: EventEmitter = new EventEmitter(); @Output() public changedLanguage: EventEmitter = new EventEmitter(); @Output() public changeUsernameClicked: EventEmitter = new EventEmitter(); - + public profileForm!: FormGroup; private sub: Subscription = new Subscription(); - constructor( - private fb: FormBuilder, - private dialog: MatDialog, - ) { + constructor(private fb: FormBuilder, private dialog: MatDialog) { this.profileForm = this.fb.group({ - userName: [{ value: '', disabled: true }, [ - Validators.required, - ]], + userName: [{ value: '', disabled: true }, [Validators.required]], firstName: [{ value: '', disabled: this.disabled }, Validators.required], lastName: [{ value: '', disabled: this.disabled }, Validators.required], nickName: [{ value: '', disabled: this.disabled }], @@ -46,9 +41,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges { public ngOnChanges(): void { this.profileForm = this.fb.group({ - userName: [{ value: '', disabled: true }, [ - Validators.required, - ]], + userName: [{ value: '', disabled: true }, [Validators.required]], firstName: [{ value: '', disabled: this.disabled }, Validators.required], lastName: [{ value: '', disabled: this.disabled }, Validators.required], nickName: [{ value: '', disabled: this.disabled }], @@ -60,7 +53,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges { this.profileForm.patchValue({ userName: this.username, ...this.user.profile }); if (this.preferredLanguage) { - this.sub = this.preferredLanguage.valueChanges.subscribe(value => { + this.sub = this.preferredLanguage.valueChanges.subscribe((value) => { this.changedLanguage.emit(value); }); } @@ -86,7 +79,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges { width: '400px', }); - dialogRef.afterClosed().subscribe(resp => { + dialogRef.afterClosed().subscribe((resp) => { if (resp) { } }); @@ -114,5 +107,4 @@ export class DetailFormComponent implements OnDestroy, OnChanges { public get preferredLanguage(): AbstractControl | null { return this.profileForm.get('preferredLanguage'); } - } diff --git a/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.html b/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.html index ecb31d784d..0009afdfb2 100644 --- a/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.html +++ b/console/src/app/pages/users/user-detail/user-detail/passwordless/passwordless.component.html @@ -1,53 +1,53 @@ - + + + + + + + + + + + + + + + + + + + +
{{ 'USER.PASSWORDLESS.NAME' | translate }} + {{ mfa?.name }} + + {{ 'USER.PASSWORDLESS.TABLESTATE' | translate }} + {{'USER.PASSWORDLESS.STATE.'+ mfa.state | translate}} + + + {{ 'USER.PASSWORDLESS.TABLEACTIONS' | translate }} + +
+
+
+ - - - - - - - - - - - - - - - - - - - -
{{ 'USER.PASSWORDLESS.NAME' | translate }} - {{ mfa?.name }} - - {{ 'USER.PASSWORDLESS.TABLESTATE' | translate }} - {{'USER.PASSWORDLESS.STATE.'+ mfa.state | translate}} - - - {{ 'USER.PASSWORDLESS.TABLEACTIONS' | translate }} - -
-
-
-
-
-
- -
+
+
+
+
\ 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 @@ - + +