WEB-233: Improve the OIDC integration with 2FA (#2616)
This commit is contained in:
@@ -7,6 +7,10 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { SystemService } from '../../system.service';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
/** Custom Service Zitadel */
|
||||
import { environment } from '../../../../environments/environment';
|
||||
import { AuthService } from 'app/zitadel/auth.service';
|
||||
|
||||
/**
|
||||
* Edit Role Description Component.
|
||||
*/
|
||||
@@ -35,7 +39,8 @@ export class EditRoleComponent implements OnInit {
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private systemService: SystemService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
private authService: AuthService
|
||||
) {
|
||||
this.route.data.subscribe((data: { role: any }) => {
|
||||
this.roleData = data.role;
|
||||
@@ -71,6 +76,13 @@ export class EditRoleComponent implements OnInit {
|
||||
*/
|
||||
submit() {
|
||||
this.systemService.updateRole(this.roleForm.value, this.roleData.id).subscribe(() => {
|
||||
if (environment.OIDC.oidcServerEnabled) {
|
||||
this.authService.updateRole(
|
||||
this.roleData.id,
|
||||
this.roleForm.get('name')?.value,
|
||||
this.roleForm.value.description
|
||||
);
|
||||
}
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user