gitlab-org--gitlab-foss/app/policies/protected_branch_policy.rb
2018-03-26 10:29:53 +01:00

9 lines
235 B
Ruby

class ProtectedBranchPolicy < BasePolicy
delegate { @subject.project }
rule { can?(:admin_project) }.policy do
enable :create_protected_branch
enable :update_protected_branch
enable :destroy_protected_branch
end
end