Commit e678f312 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Use the `GroupProjectsFinder` to find direct children

parent b9c12be5
...@@ -99,12 +99,13 @@ class GroupDescendantsFinder ...@@ -99,12 +99,13 @@ class GroupDescendantsFinder
groups.with_selects_for_list.order_by(sort) groups.with_selects_for_list.order_by(sort)
end end
def projects_for_user def direct_child_projects
Project.public_or_visible_to_user(current_user).non_archived GroupProjectsFinder.new(group: parent_group, current_user: current_user, params: params)
.execute
end end
def direct_child_projects def projects_for_user
projects_for_user.where(namespace: parent_group) Project.public_or_visible_to_user(current_user).non_archived
end end
# Finds all projects nested under `parent_group` or any of its descendant # Finds all projects nested under `parent_group` or any of its descendant
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment