gitlab-org--gitlab-foss/app/models/dashboard_milestone.rb
Adam Niedzielski cf3be218e1 Speed up dashboard milestone index by scoping IssuesFinder to user authorized projects
It improves performance in dashboard milestone index page by passing a
hint to "IssuesFinder". "IssuesFinder" generates a more performant query
when it is limited to authorized projects for user.
In the dashboard we already limit the projects to these authorized for
user (see "Dashboard::ApplicationController#projects"), so we can safely
pass this option to "IssuesFinder".
2017-01-16 11:58:16 -05:00

5 lines
110 B
Ruby

class DashboardMilestone < GlobalMilestone
def issues_finder_params
{ authorized_only: true }
end
end