diff options
author | Robert Speicher <robert@gitlab.com> | 2017-04-09 17:37:26 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-09 17:37:26 +0000 |
commit | 5e1a802b15af4ba991f9ed85a691f1a925cc0edf (patch) | |
tree | 72afca9c9cbeff206e8a38302ffdb9c09827e7dd /lib/api/helpers.rb | |
parent | 8265fe3954e225d58567878fd9200acbe84ad296 (diff) | |
parent | 11aff97d88e32effe5d8e16caccb9d23b9a4995a (diff) | |
download | gitlab-ce-5e1a802b15af4ba991f9ed85a691f1a925cc0edf.tar.gz |
Merge branch 'remove_is_admin' into 'master'
Remove the `User#is_admin?` method
Closes #30584
See merge request !10520
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 |