summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-21 18:16:39 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-21 18:18:03 +0800
commit6061c9fa3d942c4b1aa466ee8f5f8eb3ae48853e (patch)
tree58420c8b0a2f5a6649c6aba516223942d4fc60c9 /app/policies
parent1cdad622aacf9ae7e7d61e575aaa77dddf7ae7b9 (diff)
downloadgitlab-ce-6061c9fa3d942c4b1aa466ee8f5f8eb3ae48853e.tar.gz
Send only to users have :read_build access, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342#note_17193335
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/ci/build_policy.rb2
-rw-r--r--app/policies/ci/pipeline_policy.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/ci/build_policy.rb b/app/policies/ci/build_policy.rb
index 2232e231cf8..8b25332b73c 100644
--- a/app/policies/ci/build_policy.rb
+++ b/app/policies/ci/build_policy.rb
@@ -5,7 +5,7 @@ module Ci
# If we can't read build we should also not have that
# ability when looking at this in context of commit_status
- %w(read create update admin).each do |rule|
+ %w[read create update admin].each do |rule|
cannot! :"#{rule}_commit_status" unless can? :"#{rule}_build"
end
end
diff --git a/app/policies/ci/pipeline_policy.rb b/app/policies/ci/pipeline_policy.rb
new file mode 100644
index 00000000000..3d2eef1c50c
--- /dev/null
+++ b/app/policies/ci/pipeline_policy.rb
@@ -0,0 +1,4 @@
+module Ci
+ class PipelinePolicy < BuildPolicy
+ end
+end