summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-05 19:35:32 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-05 19:35:32 +0200
commitfc121cca5ba87abd24afbc8da2f76e14e386e4c8 (patch)
treeac3e7faffd417665fca6165c6d2740f4fd7af7c6 /app
parente5f24c5490294a4e990103da24e9861f21d7bfd9 (diff)
downloadgitlab-ce-fc121cca5ba87abd24afbc8da2f76e14e386e4c8.tar.gz
Do not reprocess actions when user retries pipelinefeature/gb/manual-actions-protected-branches-permissions
User who is not allowed to trigger manual actions should not be allowed to reprocess / retrigger / retry these actions.
Diffstat (limited to 'app')
-rw-r--r--app/services/ci/retry_pipeline_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/ci/retry_pipeline_service.rb b/app/services/ci/retry_pipeline_service.rb
index ecc6173a96a..5b207157345 100644
--- a/app/services/ci/retry_pipeline_service.rb
+++ b/app/services/ci/retry_pipeline_service.rb
@@ -8,6 +8,8 @@ module Ci
end
pipeline.retryable_builds.find_each do |build|
+ next unless can?(current_user, :update_build, build)
+
Ci::RetryBuildService.new(project, current_user)
.reprocess(build)
end