2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
class ProtectedBranchPolicy < BasePolicy
|
|
|
|
delegate { @subject.project }
|
|
|
|
|
|
|
|
rule { can?(:admin_project) }.policy do
|
2022-10-11 01:57:18 +05:30
|
|
|
enable :read_protected_branch
|
2018-05-09 12:01:36 +05:30
|
|
|
enable :create_protected_branch
|
|
|
|
enable :update_protected_branch
|
|
|
|
enable :destroy_protected_branch
|
|
|
|
end
|
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
ProtectedBranchPolicy.prepend_mod_with('ProtectedBranchPolicy')
|