Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 8f03c6145cb..73a69c9f215 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -271,8 +271,12 @@ class Namespace < ApplicationRecord
# Includes projects from this namespace and projects from all subgroups
# that belongs to this namespace
def all_projects
- namespace = user? ? self : self_and_descendants
- Project.where(namespace: namespace)
+ if Feature.enabled?(:recursive_approach_for_all_projects, default_enabled: :yaml)
+ namespace = user? ? self : self_and_descendants
+ Project.where(namespace: namespace)
+ else
+ Project.inside_path(full_path)
+ end
end
# Includes pipelines from this namespace and pipelines from all subgroups