05f30ac6bb
AuditEventService isn't equipped to handle logging of the destruction of entities such as CI pipelines. It's a project-level event that operates on a pipeline. The current log doesn't even indicate that the pipeline is being destroyed. This is a CE backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9105. We're removing the auditing call because it breaks the EE implementation.
11 lines
256 B
Ruby
11 lines
256 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Ci
|
|
class DestroyPipelineService < BaseService
|
|
def execute(pipeline)
|
|
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :destroy_pipeline, pipeline)
|
|
|
|
pipeline.destroy!
|
|
end
|
|
end
|
|
end
|