diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/finders/group_descendants_finder.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/finders/group_descendants_finder.rb')
-rw-r--r-- | app/finders/group_descendants_finder.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb index 7974710e67b..3d9b6e94cc6 100644 --- a/app/finders/group_descendants_finder.rb +++ b/app/finders/group_descendants_finder.rb @@ -87,13 +87,7 @@ class GroupDescendantsFinder visible_to_user = visible_to_user.or(authorized_to_user) end - group_to_query = if Feature.enabled?(:linear_group_descendants_finder, current_user, default_enabled: :yaml) - parent_group - else - hierarchy_for_parent - end - - group_to_query.descendants.where(visible_to_user) + parent_group.descendants.where(visible_to_user) # rubocop: enable CodeReuse/Finder end # rubocop: enable CodeReuse/ActiveRecord @@ -159,13 +153,7 @@ class GroupDescendantsFinder # rubocop: disable CodeReuse/ActiveRecord def projects_matching_filter # rubocop: disable CodeReuse/Finder - objects_in_hierarchy = if Feature.enabled?(:linear_group_descendants_finder, current_user, default_enabled: :yaml) - parent_group.self_and_descendants.as_ids - else - hierarchy_for_parent.base_and_descendants.select(:id) - end - - projects_nested_in_group = Project.where(namespace_id: objects_in_hierarchy) + projects_nested_in_group = Project.where(namespace_id: parent_group.self_and_descendants.as_ids) params_with_search = params.merge(search: params[:filter]) ProjectsFinder.new(params: params_with_search, |