mirror of
https://github.com/zitadel/zitadel
synced 2024-11-22 00:39:36 +00:00
fix: project fetch on init (#1650)
This commit is contained in:
parent
b3fc0d6f45
commit
221049bc40
@ -62,9 +62,20 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
|
||||
if (this.projectId && !this.grantId) {
|
||||
this.context = UserGrantContext.OWNED_PROJECT;
|
||||
|
||||
this.mgmtService.getProjectByID(this.projectId).then(resp => {
|
||||
if (resp.project) {
|
||||
this.project = resp.project;
|
||||
}
|
||||
}).catch((error: any) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
} else if (this.projectId && this.grantId) {
|
||||
this.context = UserGrantContext.GRANTED_PROJECT;
|
||||
this.mgmtService.getGrantedProjectByID(this.projectId, this.grantId).then(resp => {
|
||||
if (resp.grantedProject) {
|
||||
this.project = resp.grantedProject;
|
||||
}
|
||||
if (resp.grantedProject?.grantedRoleKeysList) {
|
||||
this.grantedRoleKeysList = resp.grantedProject?.grantedRoleKeysList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user