mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: user grants (#1645)
* fix: user grants * fix: add missing event type Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
This commit is contained in:
parent
f0b333c5cb
commit
b742166af5
@ -136,7 +136,7 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container
|
||||
*ngIf="(context === UserGrantContext.GRANTED_PROJECT || context === UserGrantContext.USER || context === UserGrantContext.NONE) && loadedId && loadedId === grant.id && grantToEdit == grant.id">
|
||||
*ngIf="(context === UserGrantContext.GRANTED_PROJECT || context === UserGrantContext.USER || context === UserGrantContext.NONE) && loadedId && loadedId === grant.projectId && grantToEdit == grant.id">
|
||||
<cnsl-form-field class="form-field" appearance="outline">
|
||||
<mat-select [(ngModel)]="grant.roleKeysList" multiple
|
||||
[disabled]="disableWrite || !((['user.grant.write$'] | hasRole | async) || ((context === UserGrantContext.OWNED_PROJECT ? ['user.grant.write:' + grant?.projectId] : context === UserGrantContext.GRANTED_PROJECT ? ['user.grant.write:' + grant?.id] : []) | hasRole | async))"
|
||||
@ -165,8 +165,9 @@
|
||||
<i class="las la-exclamation"></i>
|
||||
<span>{{'GRANTS.EMPTY' | translate}}</span>
|
||||
</div>
|
||||
<cnsl-paginator class="paginator" #paginator [timestamp]="dataSource?.viewTimestamp" [length]="dataSource.totalResult" [pageSize]="INITIAL_PAGE_SIZE"
|
||||
[length]="dataSource.totalResult" [pageSizeOptions]="[2, 3, 25, 50, 100, 250]" (page)="changePage($event)">
|
||||
<cnsl-paginator class="paginator" #paginator [timestamp]="dataSource?.viewTimestamp"
|
||||
[length]="dataSource.totalResult" [pageSize]="INITIAL_PAGE_SIZE" [length]="dataSource.totalResult"
|
||||
[pageSizeOptions]="[2, 3, 25, 50, 100, 250]" (page)="changePage($event)">
|
||||
</cnsl-paginator>
|
||||
</div>
|
||||
</app-refresh-table>
|
||||
|
@ -184,7 +184,7 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
|
||||
private getGrantRoleOptions(id: string, projectId: string): void {
|
||||
this.mgmtService.getGrantedProjectByID(projectId, id).then(resp => {
|
||||
if (resp.grantedProject) {
|
||||
this.loadedId = id;
|
||||
this.loadedId = projectId;
|
||||
this.grantRoleOptions = resp.grantedProject?.grantedRoleKeysList;
|
||||
}
|
||||
}).catch(error => {
|
||||
|
@ -160,6 +160,7 @@ func (wm *UserGrantPreConditionReadModel) Query() *eventstore.SearchQueryBuilder
|
||||
project.ProjectAddedType,
|
||||
project.ProjectRemovedType,
|
||||
project.GrantAddedType,
|
||||
project.GrantChangedType,
|
||||
project.GrantRemovedType,
|
||||
project.RoleAddedType,
|
||||
project.RoleRemovedType)
|
||||
|
Loading…
Reference in New Issue
Block a user