summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-04-09 13:20:57 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-04-09 13:20:57 +1100
commit11aff97d88e32effe5d8e16caccb9d23b9a4995a (patch)
tree610490ec6b7f4dadb9535d0614d4b1f07d85542c /lib/api/helpers.rb
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
downloadgitlab-ce-11aff97d88e32effe5d8e16caccb9d23b9a4995a.tar.gz
Remove the User#is_admin? method
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 61527c1e20b..ddff3c8c1e8 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -118,7 +118,7 @@ module API
def authenticated_as_admin!
authenticate!
- forbidden! unless current_user.is_admin?
+ forbidden! unless current_user.admin?
end
def authorize!(action, subject = :global)
@@ -358,7 +358,7 @@ module API
return unless sudo_identifier
return unless initial_current_user
- unless initial_current_user.is_admin?
+ unless initial_current_user.admin?
forbidden!('Must be admin to use sudo')
end