debian-mirror-gitlab/app/policies/deploy_token_policy.rb

12 lines
277 B
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
class DeployTokenPolicy < BasePolicy
with_options scope: :subject, score: 0
condition(:master) { @subject.project.team.master?(@user) }
rule { anonymous }.prevent_all
rule { master }.policy do
enable :create_deploy_token
enable :update_deploy_token
end
end