fix: list granted project roles (#1537)

This commit is contained in:
Fabi
2021-04-07 11:40:31 +02:00
committed by GitHub
parent f0cc12238e
commit 4d19652cd9
6 changed files with 98 additions and 0 deletions

View File

@@ -60,6 +60,10 @@ func (r *ProjectRoleSearchRequest) AppendProjectQuery(projectID string) {
r.Queries = append(r.Queries, &ProjectRoleSearchQuery{Key: ProjectRoleSearchKeyProjectID, Method: domain.SearchMethodEquals, Value: projectID})
}
func (r *ProjectRoleSearchRequest) AppendRoleKeysQuery(keys []string) {
r.Queries = append(r.Queries, &ProjectRoleSearchQuery{Key: ProjectRoleSearchKeyKey, Method: domain.SearchMethodIsOneOf, Value: keys})
}
func (r *ProjectRoleSearchRequest) EnsureLimit(limit uint64) error {
if r.Limit > limit {
return caos_errors.ThrowInvalidArgument(nil, "SEARCH-92hNf", "Errors.Limit.ExceedsDefault")