Commit 5a7a7304 authored by André Hänsel's avatar André Hänsel

Fix missing RSS feed events

The ProjectsController currently loads a list of projects the user has
access to in the function load_projects. It uses this list to render the
actual list of projects, but it also uses this list to render the
activity feed in the atom form for the RSS feed.

The problem is that load_projects already paginates the list of projects
which leads to wrong results (only the first 20 projects are considered)
when rendering the RSS feed.

This commit uses a different ProjectFinder for loading the events that
does not paginate the results and keeps the pagination in load_projects
because all the other function need paginated results.
parent dc2b1c64
...@@ -87,7 +87,9 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController ...@@ -87,7 +87,9 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
end end
def load_events def load_events
projects = load_projects(params.merge(non_public: true)) projects = ProjectsFinder
.new(params: params.merge(non_public: true), current_user: current_user)
.execute
@events = EventCollection @events = EventCollection
.new(projects, offset: params[:offset].to_i, filter: event_filter) .new(projects, offset: params[:offset].to_i, filter: event_filter)
......
---
title: Fix missing RSS feed events
merge_request: 19524
author:
type: fixed
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