mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 15:45:12 +00:00
fix: add InUserIDs query to query of user grants (#10741)
# Which Problems Are Solved Currently there is only the option to either filter for all usergrants of an organization or the usergrants of a singluar user. # How the Problems Are Solved Add the option to provide a list of userIDs to query user grants. # Additional Changes Fixed internal typo for function. # Additional Context Closes #9675
This commit is contained in:
@@ -107,6 +107,8 @@ func UserGrantQueryToQuery(ctx context.Context, query *user_pb.UserGrantQuery) (
|
||||
return UserGrantWithGrantedQueryToModel(ctx, q.WithGrantedQuery)
|
||||
case *user_pb.UserGrantQuery_UserTypeQuery:
|
||||
return UserGrantUserTypeQueryToModel(q.UserTypeQuery)
|
||||
case *user_pb.UserGrantQuery_InUserIdsQuery:
|
||||
return UserGrantInUserIDsQueryToModel(q.InUserIdsQuery)
|
||||
default:
|
||||
return nil, errors.New("invalid query")
|
||||
}
|
||||
@@ -156,6 +158,10 @@ func UserGrantUserIDQueryToModel(q *user_pb.UserGrantUserIDQuery) (query.SearchQ
|
||||
return query.NewUserGrantUserIDSearchQuery(q.UserId)
|
||||
}
|
||||
|
||||
func UserGrantInUserIDsQueryToModel(q *user_pb.UserGrantInUserIDsQuery) (query.SearchQuery, error) {
|
||||
return query.NewUserGrantInUserIDsSearchQuery(q.InUserIds)
|
||||
}
|
||||
|
||||
func UserGrantUserNameQueryToModel(q *user_pb.UserGrantUserNameQuery) (query.SearchQuery, error) {
|
||||
return query.NewUserGrantUsernameQuery(q.UserName, object.TextMethodToQuery(q.Method))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user