diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-02 00:13:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-02 00:13:36 +0300 |
commit | e415571a6e766e961cd49a0ac92576c460a49e4d (patch) | |
tree | ac24a689ea599cb1ef4ff2dcea38984e8b5502c8 /lib/api/helpers.rb | |
parent | 68ce709bef9bc89bbb9869e24508777bbe0a1a1d (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, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index a7e0a551283..f17474394e2 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -397,6 +397,10 @@ module API authorize! :update_build, user_project end + def authorize_cancel_builds! + authorize! :cancel_build, user_project + end + def require_repository_enabled!(subject = :global) not_found!("Repository") unless user_project.feature_available?(:repository, current_user) end |