Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'test' into feat/user-entitled-sets
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed Dec 14, 2023
2 parents 4b6ca79 + 44074f7 commit 1911b8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/api/gql/v3/resolvers/query/query.users.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func (r *Resolver) Users(ctx context.Context, queryArg string, pageArg *int, lim

isManager := actor.HasPermission(structures.RolePermissionManageUsers)

// Temporary measure until search is optimized
if !isManager {
return nil, errors.ErrInsufficientPrivilege().SetDetail("Search is disabled at this time")
}

// Unprivileged users must provide a query
if !isManager && len(queryArg) < 2 {
return nil, errors.ErrInvalidRequest().SetDetail("query must be at least 2 characters long")
Expand Down

0 comments on commit 1911b8f

Please sign in to comment.