diff options
author | Mark Chao <mchao@gitlab.com> | 2018-05-23 09:54:57 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-06-01 14:33:12 +0900 |
commit | 0d44f4d50ef175997fe1f90de9e622a4f3b867e3 (patch) | |
tree | 1a494b42fdc26c700c87f5ce65e5553ed7ab78db /app/policies/ci | |
parent | 76c23de3b63503a08a715afb6414596a7a4879d2 (diff) | |
download | gitlab-ce-0d44f4d50ef175997fe1f90de9e622a4f3b867e3.tar.gz |
Rephrase "maintainer" to more precise "members who can merge to the target branch"42751-rename-mr-maintainer-push
"Maintainer" will be freed to be used for #42751
Diffstat (limited to 'app/policies/ci')
-rw-r--r-- | app/policies/ci/build_policy.rb | 6 | ||||
-rw-r--r-- | app/policies/ci/pipeline_policy.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/policies/ci/build_policy.rb b/app/policies/ci/build_policy.rb index 8b65758f3e8..1c0cc7425ec 100644 --- a/app/policies/ci/build_policy.rb +++ b/app/policies/ci/build_policy.rb @@ -14,8 +14,8 @@ module Ci @subject.triggered_by?(@user) end - condition(:branch_allows_maintainer_push) do - @subject.project.branch_allows_maintainer_push?(@user, @subject.ref) + condition(:branch_allows_collaboration) do + @subject.project.branch_allows_collaboration?(@user, @subject.ref) end rule { protected_ref }.policy do @@ -25,7 +25,7 @@ module Ci rule { can?(:admin_build) | (can?(:update_build) & owner_of_job) }.enable :erase_build - rule { can?(:public_access) & branch_allows_maintainer_push }.policy do + rule { can?(:public_access) & branch_allows_collaboration }.policy do enable :update_build enable :update_commit_status end diff --git a/app/policies/ci/pipeline_policy.rb b/app/policies/ci/pipeline_policy.rb index 540e4235299..b81329d0625 100644 --- a/app/policies/ci/pipeline_policy.rb +++ b/app/policies/ci/pipeline_policy.rb @@ -4,13 +4,13 @@ module Ci condition(:protected_ref) { ref_protected?(@user, @subject.project, @subject.tag?, @subject.ref) } - condition(:branch_allows_maintainer_push) do - @subject.project.branch_allows_maintainer_push?(@user, @subject.ref) + condition(:branch_allows_collaboration) do + @subject.project.branch_allows_collaboration?(@user, @subject.ref) end rule { protected_ref }.prevent :update_pipeline - rule { can?(:public_access) & branch_allows_maintainer_push }.policy do + rule { can?(:public_access) & branch_allows_collaboration }.policy do enable :update_pipeline end |