fix(console): user grant read check (#681)

* fix: user grant read check

* fix guard

* rm console.logs
This commit is contained in:
Max Peintner
2020-09-01 16:23:24 +02:00
committed by GitHub
parent 0dd49f7430
commit 0d44b69c0e
6 changed files with 8 additions and 8 deletions
@@ -88,7 +88,7 @@
<ng-template appHasRole [appHasRole]="['user.grant.read']">
<app-card *ngIf="project?.projectId" title="{{ 'GRANTS.PROJECT.TITLE' | translate }}"
description="{{'GRANTS.PROJECT.DESCRIPTION' | translate }}">
<app-user-grants [context]="userGrantContext" [projectId]="projectId"
<app-user-grants [context]="UserGrantContext.OWNED_PROJECT" [projectId]="projectId"
[allowCreate]="(['user.grant.write', 'user.grant.write:'+projectId] | hasRole) | async"
[allowDelete]="(['user.grant.delete','user.grant.delete:'+projectId] | hasRole) | async">
</app-user-grants>
@@ -65,7 +65,7 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy {
public isZitadel: boolean = false;
public userGrantSearchKey: UserGrantSearchKey = UserGrantSearchKey.USERGRANTSEARCHKEY_PROJECT_ID;
public userGrantContext: UserGrantContext = UserGrantContext.OWNED_PROJECT;
public UserGrantContext: any = UserGrantContext;
// members
public totalMemberResult: number = 0;