diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-11-13 17:17:01 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-11-13 17:24:10 +0100 |
commit | 0bc14b452218277a55f71ab22bed724b696ecf28 (patch) | |
tree | e40bfff5efb59240cac45ac07906b3fccaf76291 /app/services/ci | |
parent | 6173d4639a388f59872291657a2528256c90a846 (diff) | |
download | gitlab-ce-0bc14b452218277a55f71ab22bed724b696ecf28.tar.gz |
Authorize DestroyPipelineService against pipeline
Diffstat (limited to 'app/services/ci')
-rw-r--r-- | app/services/ci/destroy_pipeline_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/ci/destroy_pipeline_service.rb b/app/services/ci/destroy_pipeline_service.rb index 059e871f20e..f40e73b3efb 100644 --- a/app/services/ci/destroy_pipeline_service.rb +++ b/app/services/ci/destroy_pipeline_service.rb @@ -3,11 +3,11 @@ module Ci class DestroyPipelineService < BaseService def execute(pipeline) - return false unless can?(current_user, :destroy_pipeline, project) + return false unless can?(current_user, :destroy_pipeline, pipeline) AuditEventService.new(current_user, pipeline).security_event - pipeline.destroy + pipeline.destroy! end end end |