diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-04-09 13:20:57 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-04-09 13:20:57 +1100 |
commit | 11aff97d88e32effe5d8e16caccb9d23b9a4995a (patch) | |
tree | 610490ec6b7f4dadb9535d0614d4b1f07d85542c /lib/api/entities.rb | |
parent | 3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff) | |
download | gitlab-ce-11aff97d88e32effe5d8e16caccb9d23b9a4995a.tar.gz |
Remove the User#is_admin? method
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 45625e00f7d..9919762cd82 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -14,7 +14,7 @@ module API class User < UserBasic expose :created_at - expose :is_admin?, as: :is_admin + expose :admin?, as: :is_admin expose :bio, :location, :skype, :linkedin, :twitter, :website_url, :organization end @@ -611,9 +611,9 @@ module API expose :locked expose :version, :revision, :platform, :architecture expose :contacted_at - expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? } + expose :token, if: lambda { |runner, options| options[:current_user].admin? || !runner.is_shared? } expose :projects, with: Entities::BasicProjectDetails do |runner, options| - if options[:current_user].is_admin? + if options[:current_user].admin? runner.projects else options[:current_user].authorized_projects.where(id: runner.projects) |