debian-mirror-gitlab/app/policies/deployment_policy.rb
2018-12-13 13:39:08 +05:30

14 lines
305 B
Ruby

# frozen_string_literal: true
class DeploymentPolicy < BasePolicy
delegate { @subject.project }
condition(:can_retry_deployable) do
can?(:update_build, @subject.deployable)
end
rule { ~can_retry_deployable }.policy do
prevent :create_deployment
prevent :update_deployment
end
end