debian-mirror-gitlab/app/services/ci/destroy_secure_file_service.rb
2022-05-07 20:08:51 +05:30

11 lines
277 B
Ruby

# frozen_string_literal: true
module Ci
class DestroySecureFileService < BaseService
def execute(secure_file)
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_secure_files, secure_file.project)
secure_file.destroy!
end
end
end