mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-31 11:32:15 +00:00
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:
@@ -50,6 +50,17 @@ func (q *Queries) ProjectChanges(ctx context.Context, projectID string, lastSequ
|
||||
return q.changes(ctx, query, lastSequence, limit, sortAscending, auditLogRetention)
|
||||
}
|
||||
|
||||
func (q *Queries) ProjectGrantChanges(ctx context.Context, projectID, grantID string, lastSequence uint64, limit uint64, sortAscending bool, auditLogRetention time.Duration) (*Changes, error) {
|
||||
query := func(query *eventstore.SearchQuery) {
|
||||
query.AggregateTypes(project.AggregateType).
|
||||
AggregateIDs(projectID).
|
||||
EventData(map[string]interface{}{
|
||||
"grantId": grantID,
|
||||
})
|
||||
}
|
||||
return q.changes(ctx, query, lastSequence, limit, sortAscending, auditLogRetention)
|
||||
}
|
||||
|
||||
func (q *Queries) ApplicationChanges(ctx context.Context, projectID, appID string, lastSequence uint64, limit uint64, sortAscending bool, auditLogRetention time.Duration) (*Changes, error) {
|
||||
query := func(query *eventstore.SearchQuery) {
|
||||
query.AggregateTypes(project.AggregateType).
|
||||
|
||||
Reference in New Issue
Block a user