summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-11-13 17:27:00 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-11-13 19:00:28 +0100
commitb7e5f73cd7dca105d2bd0dbab559439ee00aa91a (patch)
tree5e1d0908047bd483b55a455878d4817b5948a51d /app/services
parent0bc14b452218277a55f71ab22bed724b696ecf28 (diff)
downloadgitlab-ce-b7e5f73cd7dca105d2bd0dbab559439ee00aa91a.tar.gz
Raise exception when user is not authorized
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/destroy_pipeline_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/ci/destroy_pipeline_service.rb b/app/services/ci/destroy_pipeline_service.rb
index f40e73b3efb..13f892aabb8 100644
--- a/app/services/ci/destroy_pipeline_service.rb
+++ b/app/services/ci/destroy_pipeline_service.rb
@@ -3,7 +3,7 @@
module Ci
class DestroyPipelineService < BaseService
def execute(pipeline)
- return false unless can?(current_user, :destroy_pipeline, pipeline)
+ raise Gitlab::Access::AccessDeniedError unless can?(current_user, :destroy_pipeline, pipeline)
AuditEventService.new(current_user, pipeline).security_event