mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +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 <38692350+hifabienne@users.noreply.github.com> * Update internal/query/user_membership.go Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com>
This commit is contained in:
@@ -312,6 +312,28 @@ func ListComparisonFromMethod(m domain.SearchMethod) ListComparison {
|
||||
}
|
||||
}
|
||||
|
||||
type or struct {
|
||||
queries []SearchQuery
|
||||
}
|
||||
|
||||
func Or(queries ...SearchQuery) *or {
|
||||
return &or{
|
||||
queries: queries,
|
||||
}
|
||||
}
|
||||
|
||||
func (q *or) toQuery(query sq.SelectBuilder) sq.SelectBuilder {
|
||||
return query.Where(q.comp())
|
||||
}
|
||||
|
||||
func (q *or) comp() sq.Sqlizer {
|
||||
queries := make([]sq.Sqlizer, 0)
|
||||
for _, query := range q.queries {
|
||||
queries = append(queries, query.comp())
|
||||
}
|
||||
return sq.Or(queries)
|
||||
}
|
||||
|
||||
type BoolQuery struct {
|
||||
Column Column
|
||||
Value bool
|
||||
|
Reference in New Issue
Block a user