blob: 368377048a4c3da332347572ed03a8bbda3906a4 (
plain)
1
2
3
4
5
6
7
8
9
10
|
# frozen_string_literal: true
class DeployKeysProjectPolicy < BasePolicy
delegate { @subject.project }
with_options scope: :subject, score: 0
condition(:public_deploy_key) { @subject.deploy_key.public? }
rule { public_deploy_key & can?(:admin_project) }.enable :update_deploy_keys_project
end
|