summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-09-15 19:34:52 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-09-15 19:34:52 -0400
commit3cbaed97f1c085647bffcf8a729b72bc2a52d59e (patch)
treecb0283b4b005c64c3eb8219dbbdc04686bca7b3f /lib
parent3dd2248605ce2183f02ab268fc1f8b0b164f0bed (diff)
downloadgitlab-ce-3cbaed97f1c085647bffcf8a729b72bc2a52d59e.tar.gz
Ensure we use `Entities::User` for non-admin `users/:id` API requests
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 1825c90a23b..bdebda58d3f 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -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