summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorKamil TrzciƄski <kamil@gitlab.com>2019-01-28 12:12:30 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-31 16:52:50 +0100
commitd4c7214799586a9b5063b0ea5b4327bbffe1170f (patch)
tree5e39656039d6f73e19b4cbc3575dba65d44aee4d /app/models/project.rb
parent4b868ba8e71be9aa5591378555122d76c27ac777 (diff)
downloadgitlab-ce-d4c7214799586a9b5063b0ea5b4327bbffe1170f.tar.gz
[master] Pipelines section is available to unauthorized users
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index d5e72d2cc66..b385b89449d 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -578,6 +578,14 @@ class Project < ActiveRecord::Base
end
end
+ def all_pipelines
+ if builds_enabled?
+ super
+ else
+ super.external
+ end
+ end
+
# returns all ancestor-groups upto but excluding the given namespace
# when no namespace is given, all ancestors upto the top are returned
def ancestors_upto(top = nil, hierarchy_order: nil)