mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-18 03:15:11 +00:00
fix: console app type (#1437)
* home, user create, list, app list * org create fix * fix user bindings, usertable, changes, projects * fix app grid type, domains * e.164 international phonenumber validation, create user, phone email dialog * single authmethod create dialog * fix timestamp to date pipe, app create secret dialog * validate e164 number edit dialog * fix machine keys, timestamp pipe * rm comment * projecttype circular deps * downgrade protoc to 3.13.0 due to deserializer error, fix circular dep * apptype controlname * fix user grants, autocomplete components * apptype reference
This commit is contained in:
@@ -95,6 +95,10 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
public addGrant(): void {
|
||||
switch (this.context) {
|
||||
case UserGrantContext.OWNED_PROJECT:
|
||||
console.log('owned', this.userId,
|
||||
this.rolesList,
|
||||
this.projectId,
|
||||
this.grantId);
|
||||
this.userService.addUserGrant(
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
@@ -107,6 +111,11 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
});
|
||||
break;
|
||||
case UserGrantContext.GRANTED_PROJECT:
|
||||
|
||||
console.log('granted', this.userId,
|
||||
this.rolesList,
|
||||
this.projectId,
|
||||
this.grantId);
|
||||
this.userService.addUserGrant(
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
@@ -126,10 +135,15 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
grantId = (this.project as GrantedProject.AsObject).grantId;
|
||||
}
|
||||
|
||||
console.log(this.userId,
|
||||
this.rolesList,
|
||||
this.projectId,
|
||||
grantId);
|
||||
|
||||
this.userService.addUserGrant(
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
(this.project as GrantedProject.AsObject).projectId,
|
||||
this.projectId,
|
||||
grantId,
|
||||
).then(() => {
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUSERGRANTADDED', true);
|
||||
@@ -148,7 +162,7 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
this.userService.addUserGrant(
|
||||
this.userId,
|
||||
this.rolesList,
|
||||
(this.project as GrantedProject.AsObject).projectId,
|
||||
this.projectId,
|
||||
tempGrantId,
|
||||
).then(() => {
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUSERGRANTADDED', true);
|
||||
@@ -163,7 +177,7 @@ export class UserGrantCreateComponent implements OnDestroy {
|
||||
|
||||
public selectProject(project: Project.AsObject | GrantedProject.AsObject | any): void {
|
||||
this.project = project;
|
||||
this.projectId = project.projectId;
|
||||
this.projectId = project.id || project.projectId;
|
||||
this.grantRolesKeyList = project.roleKeysList ?? [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user