diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-20 15:09:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-20 15:09:18 +0000 |
commit | 364f6f2e33e6f5eafe63b25d9256b88e72141b1c (patch) | |
tree | ee6dc003a354e7466d5c45e5587c0f8172312122 /app/finders | |
parent | 98252e0dd60cbcb316231085e206d9872f243b8a (diff) | |
download | gitlab-ce-364f6f2e33e6f5eafe63b25d9256b88e72141b1c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/events_finder.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/finders/events_finder.rb b/app/finders/events_finder.rb index 6d059e10d05..7755cbdf9e5 100644 --- a/app/finders/events_finder.rb +++ b/app/finders/events_finder.rb @@ -43,16 +43,17 @@ class EventsFinder events = sort(events) events = events.with_associations if params[:with_associations] - paginated_filtered_by_user_visibility(events) end private def get_events - return EventCollection.new(current_user.authorized_projects).all_project_events if scope == 'all' - - source.events + if current_user && scope == 'all' + EventCollection.new(current_user.authorized_projects).all_project_events + else + source.events + end end # rubocop: disable CodeReuse/ActiveRecord |