Commit f37b0081 authored by Rémy Coutable's avatar Rémy Coutable

Re-add the :push_code_to_protected_branches permission

This was removed in gitlab-org/gitlab-ce!11000.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 23f1cafb
......@@ -110,6 +110,7 @@ class ProjectPolicy < BasePolicy
end
def master_access!
can! :push_code_to_protected_branches
can! :delete_protected_branch
can! :update_project_snippet
can! :update_environment
......@@ -188,6 +189,7 @@ class ProjectPolicy < BasePolicy
def archived_access!
cannot! :create_merge_request
cannot! :push_code
cannot! :push_code_to_protected_branches
cannot! :delete_protected_branch
cannot! :update_merge_request
cannot! :admin_merge_request
......@@ -236,6 +238,7 @@ class ProjectPolicy < BasePolicy
unless repository_enabled
cannot! :push_code
cannot! :push_code_to_protected_branches
cannot! :delete_protected_branch
cannot! :download_code
cannot! :fork_project
......
......@@ -44,7 +44,8 @@ describe ProjectPolicy, models: true do
let(:master_permissions) do
%i[
delete_protected_branch update_project_snippet update_environment
push_code_to_protected_branches delete_protected_branch
update_project_snippet update_environment
update_deployment admin_milestone admin_project_snippet
admin_project_member admin_note admin_wiki admin_project
admin_commit_status admin_build admin_container_image
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment