Merge branch 'speed-up-dashboard-milestone-index' into 'master'

Speed up dashboard milestone index by scoping IssuesFinder to user authorized projects

See merge request !8524
This commit is contained in:
Sean McGivern 2017-01-19 10:10:15 +00:00
commit 2a0d634291
3 changed files with 12 additions and 2 deletions

View file

@ -19,11 +19,11 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
private
def milestones
@milestones = GlobalMilestone.build_collection(@projects, params)
@milestones = DashboardMilestone.build_collection(@projects, params)
end
def milestone
@milestone = GlobalMilestone.build(@projects, params[:title])
@milestone = DashboardMilestone.build(@projects, params[:title])
render_404 unless @milestone
end
end

View file

@ -0,0 +1,5 @@
class DashboardMilestone < GlobalMilestone
def issues_finder_params
{ authorized_only: true }
end
end

View file

@ -0,0 +1,5 @@
---
title: Speed up dashboard milestone index by scoping IssuesFinder to user authorized
projects
merge_request: 8524
author: