2018-03-23 14:24:06 -04:00
|
|
|
class ProtectedBranchPolicy < BasePolicy
|
|
|
|
delegate { @subject.project }
|
|
|
|
|
|
|
|
rule { can?(:admin_project) }.policy do
|
2018-03-24 20:54:56 -04:00
|
|
|
enable :create_protected_branch
|
2018-03-23 14:24:06 -04:00
|
|
|
enable :update_protected_branch
|
2018-03-24 20:54:56 -04:00
|
|
|
enable :destroy_protected_branch
|
2018-03-23 14:24:06 -04:00
|
|
|
end
|
|
|
|
end
|