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/runners.rb | |
parent | 3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff) | |
download | gitlab-ce-11aff97d88e32effe5d8e16caccb9d23b9a4995a.tar.gz |
Remove the User#is_admin? method
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r-- | lib/api/runners.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb index a77c876a749..db6c7c59092 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -161,18 +161,18 @@ module API end def authenticate_show_runner!(runner) - return if runner.is_shared || current_user.is_admin? + return if runner.is_shared || current_user.admin? forbidden!("No access granted") unless user_can_access_runner?(runner) end def authenticate_update_runner!(runner) - return if current_user.is_admin? + return if current_user.admin? forbidden!("Runner is shared") if runner.is_shared? forbidden!("No access granted") unless user_can_access_runner?(runner) end def authenticate_delete_runner!(runner) - return if current_user.is_admin? + return if current_user.admin? forbidden!("Runner is shared") if runner.is_shared? forbidden!("Runner associated with more than one project") if runner.projects.count > 1 forbidden!("No access granted") unless user_can_access_runner?(runner) @@ -181,7 +181,7 @@ module API def authenticate_enable_runner!(runner) forbidden!("Runner is shared") if runner.is_shared? forbidden!("Runner is locked") if runner.locked? - return if current_user.is_admin? + return if current_user.admin? forbidden!("No access granted") unless user_can_access_runner?(runner) end |