Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e678f312
Commit
e678f312
authored
Oct 10, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the `GroupProjectsFinder` to find direct children
parent
b9c12be5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
app/finders/group_descendants_finder.rb
app/finders/group_descendants_finder.rb
+5
-4
No files found.
app/finders/group_descendants_finder.rb
View file @
e678f312
...
...
@@ -99,12 +99,13 @@ class GroupDescendantsFinder
groups
.
with_selects_for_list
.
order_by
(
sort
)
end
def
projects_for_user
Project
.
public_or_visible_to_user
(
current_user
).
non_archived
def
direct_child_projects
GroupProjectsFinder
.
new
(
group:
parent_group
,
current_user:
current_user
,
params:
params
)
.
execute
end
def
direct_child_projects
projects_for_user
.
where
(
namespace:
parent_group
)
def
projects_for_user
Project
.
public_or_visible_to_user
(
current_user
).
non_archived
end
# Finds all projects nested under `parent_group` or any of its descendant
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment