summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorMike Ricketts <rickettm@uk.ibm.com>2017-06-20 14:54:29 +0000
committerRémy Coutable <remy@rymai.me>2017-06-20 14:54:29 +0000
commit0e7478064f3cf91fec8cffb86a74503ab3e0322d (patch)
treebe88ac18b51372e72855355e935489591a9d3775 /lib/api/entities.rb
parent745d46bc88be45066d4abb448f1308f11f970e26 (diff)
downloadgitlab-ce-0e7478064f3cf91fec8cffb86a74503ab3e0322d.tar.gz
Re-instate is_admin flag in users API is current user is an admin
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 412443a2405..8bce79529e6 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -43,11 +43,14 @@ module API
expose :external
end
- class UserWithPrivateDetails < UserPublic
- expose :private_token
+ class UserWithAdmin < UserPublic
expose :admin?, as: :is_admin
end
+ class UserWithPrivateDetails < UserWithAdmin
+ expose :private_token
+ end
+
class Email < Grape::Entity
expose :id, :email
end