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

10 lines
235 B
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
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