debian-mirror-gitlab/app/services/projects/container_repository/destroy_service.rb
2018-11-20 20:47:30 +05:30

13 lines
302 B
Ruby

# frozen_string_literal: true
module Projects
module ContainerRepository
class DestroyService < BaseService
def execute(container_repository)
return false unless can?(current_user, :update_container_image, project)
container_repository.destroy
end
end
end
end