diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-06 21:08:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-06 21:08:22 +0300 |
commit | 5a73318262aab6ab952f2b7205b3674ea1f20053 (patch) | |
tree | e53191adbc529ce23ca08a73e1235c7b6fb6ced5 /lib/api/helpers.rb | |
parent | 552877c4d1c535f529be13862692a8fe826a72a2 (diff) |
Add latest changes from gitlab-org/gitlab@master
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 75e7612bd5b..86763b2cd67 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -301,7 +301,7 @@ module API def authenticated_as_admin! authenticate! - forbidden! unless current_user.admin? + forbidden! unless current_user.can_admin_all_resources? end def authorize!(action, subject = :global, reason = nil) @@ -710,7 +710,7 @@ module API unauthorized! unless initial_current_user - unless initial_current_user.admin? + unless initial_current_user.can_admin_all_resources? forbidden!('Must be admin to use sudo') end |