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.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 90e06e44165..5f41441058b 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -271,9 +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_descendant_ids
-
- 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
def has_parent?