Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-20 18:09:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-20 18:09:18 +0300
commit364f6f2e33e6f5eafe63b25d9256b88e72141b1c (patch)
treeee6dc003a354e7466d5c45e5587c0f8172312122 /app/finders/events_finder.rb
parent98252e0dd60cbcb316231085e206d9872f243b8a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders/events_finder.rb')
-rw-r--r--app/finders/events_finder.rb9
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