mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 16:37:41 +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) {
|
if (this.projectId && !this.grantId) {
|
||||||
this.context = UserGrantContext.OWNED_PROJECT;
|
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) {
|
} else if (this.projectId && this.grantId) {
|
||||||
this.context = UserGrantContext.GRANTED_PROJECT;
|
this.context = UserGrantContext.GRANTED_PROJECT;
|
||||||
this.mgmtService.getGrantedProjectByID(this.projectId, this.grantId).then(resp => {
|
this.mgmtService.getGrantedProjectByID(this.projectId, this.grantId).then(resp => {
|
||||||
|
if (resp.grantedProject) {
|
||||||
|
this.project = resp.grantedProject;
|
||||||
|
}
|
||||||
if (resp.grantedProject?.grantedRoleKeysList) {
|
if (resp.grantedProject?.grantedRoleKeysList) {
|
||||||
this.grantedRoleKeysList = resp.grantedProject?.grantedRoleKeysList;
|
this.grantedRoleKeysList = resp.grantedProject?.grantedRoleKeysList;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user