diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-04-09 05:20:57 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-04-09 05:20:57 +0300 |
commit | 11aff97d88e32effe5d8e16caccb9d23b9a4995a (patch) | |
tree | 610490ec6b7f4dadb9535d0614d4b1f07d85542c /lib/api/helpers.rb | |
parent | 3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff) |
Remove the User#is_admin? method
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
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 |