diff options
Diffstat (limited to 'app/controllers/concerns/renders_projects_list.rb')
-rw-r--r-- | app/controllers/concerns/renders_projects_list.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/concerns/renders_projects_list.rb b/app/controllers/concerns/renders_projects_list.rb index 05bd9972ee7..2d37bc3f9a5 100644 --- a/app/controllers/concerns/renders_projects_list.rb +++ b/app/controllers/concerns/renders_projects_list.rb @@ -1,13 +1,17 @@ # frozen_string_literal: true module RendersProjectsList + include RendersMemberAccess + def prepare_projects_for_rendering(projects) preload_max_member_access_for_collection(Project, projects) + current_user.preloaded_member_roles_for_projects(projects) if current_user # Call the count methods on every project, so the BatchLoader would load them all at # once when the entities are rendered projects.each(&:forks_count) projects.each(&:open_issues_count) + projects.each(&:open_merge_requests_count) projects end |