Skip to content
Snippets Groups Projects
Commit 3cbaed97 authored by Robert Speicher's avatar Robert Speicher
Browse files

Ensure we use `Entities::User` for non-admin `users/:id` API requests

parent 3dd22486
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -88,7 +88,7 @@ module API
user = User.find_by(id: params[:id])
not_found!('User') unless user && can?(current_user, :read_user, user)
 
opts = current_user&.admin? ? { with: Entities::UserWithAdmin } : {}
opts = current_user&.admin? ? { with: Entities::UserWithAdmin } : { with: Entities::User }
present user, opts
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment