Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 00:13:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-02 00:13:36 +0300
commite415571a6e766e961cd49a0ac92576c460a49e4d (patch)
treeac24a689ea599cb1ef4ff2dcea38984e8b5502c8 /lib/api/helpers.rb
parent68ce709bef9bc89bbb9869e24508777bbe0a1a1d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
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