fix: project grants (#4031)

* fix: filter granted memberships correctly

* fix: only show changes of granted project

* Apply suggestions from code review

Co-authored-by: Fabi <[email protected]>

* Update internal/query/user_membership.go

Co-authored-by: Fabi <[email protected]>

Co-authored-by: Fabi <[email protected]>
This commit is contained in:
Livio Spring
2022-07-27 07:55:44 +00:00
committed by GitHub
co-authored by Fabi
parent c15577c1f9
commit 5bd9badbcf
14 changed files with 224 additions and 44 deletions
@@ -19,6 +19,7 @@ export enum ChangeType {
USER = 'user',
ORG = 'org',
PROJECT = 'project',
PROJECT_GRANT= 'project-grant',
APP = 'app',
}
@@ -93,6 +94,9 @@ export class ChangesComponent implements OnInit, OnDestroy {
case ChangeType.PROJECT:
first = this.mgmtUserService.listProjectChanges(this.id, 30, 0);
break;
case ChangeType.PROJECT_GRANT:
first = this.mgmtUserService.listProjectGrantChanges(this.id, this.secId, 30, 0);
break;
case ChangeType.ORG:
first = this.mgmtUserService.listOrgChanges(30, 0);
break;
@@ -126,6 +130,9 @@ export class ChangesComponent implements OnInit, OnDestroy {
case ChangeType.PROJECT:
more = this.mgmtUserService.listProjectChanges(this.id, 20, cursor);
break;
case ChangeType.PROJECT_GRANT:
more = this.mgmtUserService.listProjectGrantChanges(this.id, this.secId, 20, cursor);
break;
case ChangeType.ORG:
more = this.mgmtUserService.listOrgChanges(20, cursor);
break;