-
- Downloads
- Use `GlobalPolicy` to authorize the users that a non-authenticated user can fetch from `/api/v4/users`. We allow access if the `Gitlab::VisibilityLevel::PUBLIC` visibility level is not restricted. - Further, as before, `/api/v4/users` is only accessible to unauthenticated users if the `username` parameter is passed. - Turn off `authenticate!` for the `/api/v4/users` endpoint by matching on the actual route + method, rather than the description. - Change the type of `current_user` check in `UsersFinder` to be more compatible with EE.
Showing
- app/finders/users_finder.rb 4 additions, 7 deletionsapp/finders/users_finder.rb
- app/policies/base_policy.rb 6 additions, 0 deletionsapp/policies/base_policy.rb
- app/policies/global_policy.rb 2 additions, 1 deletionapp/policies/global_policy.rb
- app/policies/user_policy.rb 0 additions, 6 deletionsapp/policies/user_policy.rb
- lib/api/helpers.rb 2 additions, 2 deletionslib/api/helpers.rb
- lib/api/users.rb 11 additions, 15 deletionslib/api/users.rb
- spec/requests/api/users_spec.rb 1 addition, 1 deletionspec/requests/api/users_spec.rb
Please register or sign in to comment