summaryrefslogtreecommitdiff
path: root/app/policies/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/policies/ci
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
downloadgitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/policies/ci')
-rw-r--r--app/policies/ci/build_policy.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/policies/ci/build_policy.rb b/app/policies/ci/build_policy.rb
index cc66ad0577d..b3950c6a0e3 100644
--- a/app/policies/ci/build_policy.rb
+++ b/app/policies/ci/build_policy.rb
@@ -20,6 +20,11 @@ module Ci
end
end
+ # overridden in EE
+ condition(:protected_environment_access) do
+ false
+ end
+
condition(:owner_of_job) do
@subject.triggered_by?(@user)
end
@@ -40,7 +45,7 @@ module Ci
@subject.pipeline.webide?
end
- rule { protected_ref | archived }.policy do
+ rule { ~protected_environment_access & (protected_ref | archived) }.policy do
prevent :update_build
prevent :update_commit_status
prevent :erase_build