summaryrefslogtreecommitdiff
path: root/app/policies/protected_branch_policy.rb
blob: 1a5c6528b82cbecebd8c45c977a2793a20f0ca29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

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

ProtectedBranchPolicy.prepend_if_ee('EE::ProtectedBranchPolicy')