mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-10 08:05:12 +00:00
fix(console): some bugs (#1538)
* fix feature pipe, only org check * fix user, email update * fix roles
This commit is contained in:
@@ -37,7 +37,7 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
|
||||
public UserGrantContext: any = UserGrantContext;
|
||||
|
||||
public grantRolesKeyList: string[] = [];
|
||||
public grantedRoleKeysList: string[] = [];
|
||||
|
||||
public user!: User.AsObject;
|
||||
public UserTarget: any = UserTarget;
|
||||
@@ -66,7 +66,7 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
this.context = UserGrantContext.GRANTED_PROJECT;
|
||||
this.mgmtService.getGrantedProjectByID(this.projectId, this.grantId).then(resp => {
|
||||
if (resp.grantedProject?.grantedRoleKeysList) {
|
||||
this.grantRolesKeyList = resp.grantedProject?.grantedRoleKeysList;
|
||||
this.grantedRoleKeysList = resp.grantedProject?.grantedRoleKeysList;
|
||||
}
|
||||
}).catch((error: any) => {
|
||||
this.toast.showError(error);
|
||||
@@ -139,10 +139,11 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
});
|
||||
break;
|
||||
case UserGrantContext.NONE:
|
||||
console.log('none');
|
||||
let tempGrantId;
|
||||
|
||||
if ((this.project as GrantedProject.AsObject)?.projectId) {
|
||||
tempGrantId = (this.project as GrantedProject.AsObject).projectId;
|
||||
if ((this.project as GrantedProject.AsObject)?.grantId) {
|
||||
tempGrantId = (this.project as GrantedProject.AsObject).grantId;
|
||||
}
|
||||
|
||||
this.userService.addUserGrant(
|
||||
@@ -158,13 +159,13 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public selectProject(project: Project.AsObject | GrantedProject.AsObject | any): void {
|
||||
this.project = project;
|
||||
this.projectId = project.id || project.projectId;
|
||||
this.grantRolesKeyList = project.roleKeysList ?? [];
|
||||
|
||||
this.grantedRoleKeysList = project.grantedRoleKeysList ?? [];
|
||||
}
|
||||
|
||||
public selectUser(user: User.AsObject): void {
|
||||
|
||||
Reference in New Issue
Block a user