Commit e226c169 authored by David Fernandez's avatar David Fernandez

Use the `.all_projects` scope

To take advantage of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56078
parent 10736e4f
...@@ -59,8 +59,7 @@ module Packages ...@@ -59,8 +59,7 @@ module Packages
# Returns the projects that the current user can view within a group. # Returns the projects that the current user can view within a group.
def projects_visible_to_current_user def projects_visible_to_current_user
::Project group.all_projects
.in_namespace(group.self_and_descendants.select(:id))
.public_or_visible_to_user(current_user) .public_or_visible_to_user(current_user)
end end
end end
......
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