Commit 2a0d6342 authored by Sean McGivern's avatar Sean McGivern

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
parents 9e485500 cf3be218
...@@ -19,11 +19,11 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController ...@@ -19,11 +19,11 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
private private
def milestones def milestones
@milestones = GlobalMilestone.build_collection(@projects, params) @milestones = DashboardMilestone.build_collection(@projects, params)
end end
def milestone def milestone
@milestone = GlobalMilestone.build(@projects, params[:title]) @milestone = DashboardMilestone.build(@projects, params[:title])
render_404 unless @milestone render_404 unless @milestone
end end
end end
class DashboardMilestone < GlobalMilestone
def issues_finder_params
{ authorized_only: true }
end
end
---
title: Speed up dashboard milestone index by scoping IssuesFinder to user authorized
projects
merge_request: 8524
author:
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