diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-07-18 22:13:57 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-07-18 22:13:57 +0800 |
commit | 1ed6d1541c7973c08cdd4c1906ddcc0c3db893e3 (patch) | |
tree | a224537101857d7a56327ef53e716c6e470736e5 /app/policies | |
parent | a27cf281b17641f3f33712633099369867415309 (diff) | |
download | gitlab-ce-1ed6d1541c7973c08cdd4c1906ddcc0c3db893e3.tar.gz |
Rename :user_cannot_update to :protected_ref
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/ci/build_policy.rb | 4 | ||||
-rw-r--r-- | app/policies/ci/pipeline_policy.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/policies/ci/build_policy.rb b/app/policies/ci/build_policy.rb index 00f18d0155b..984e5482288 100644 --- a/app/policies/ci/build_policy.rb +++ b/app/policies/ci/build_policy.rb @@ -1,6 +1,6 @@ module Ci class BuildPolicy < CommitStatusPolicy - condition(:user_cannot_update) do + condition(:protected_ref) do access = ::Gitlab::UserAccess.new(@user, project: @subject.project) if @subject.tag? @@ -10,6 +10,6 @@ module Ci end end - rule { user_cannot_update }.prevent :update_build + rule { protected_ref }.prevent :update_build end end diff --git a/app/policies/ci/pipeline_policy.rb b/app/policies/ci/pipeline_policy.rb index 07d724c9cfd..4e689a9efd5 100644 --- a/app/policies/ci/pipeline_policy.rb +++ b/app/policies/ci/pipeline_policy.rb @@ -2,7 +2,7 @@ module Ci class PipelinePolicy < BasePolicy delegate { @subject.project } - condition(:user_cannot_update) do + condition(:protected_ref) do access = ::Gitlab::UserAccess.new(@user, project: @subject.project) if @subject.tag? @@ -12,6 +12,6 @@ module Ci end end - rule { user_cannot_update }.prevent :update_pipeline + rule { protected_ref }.prevent :update_pipeline end end |