Read about our upcoming Code of Conduct on this issue

deploy_token_policy.rb 289 Bytes
Newer Older
1
2
class DeployTokenPolicy < BasePolicy
  with_options scope: :subject, score: 0
3
  condition(:maintainer) { @subject.project.team.maintainer?(@user) }
4
5
6

  rule { anonymous }.prevent_all

7
  rule { maintainer }.policy do
8
9
10
11
    enable :create_deploy_token
    enable :update_deploy_token
  end
end