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:
commit
2a0d634291
3 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
|
5
app/models/dashboard_milestone.rb
Normal file
5
app/models/dashboard_milestone.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class DashboardMilestone < GlobalMilestone
|
||||
def issues_finder_params
|
||||
{ authorized_only: true }
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Speed up dashboard milestone index by scoping IssuesFinder to user authorized
|
||||
projects
|
||||
merge_request: 8524
|
||||
author:
|
Loading…
Reference in a new issue