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:
Diffstat (limited to 'app/presenters/event_presenter.rb')
-rw-r--r--app/presenters/event_presenter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/presenters/event_presenter.rb b/app/presenters/event_presenter.rb
index 8f7b2d5868e..7f7c323fcac 100644
--- a/app/presenters/event_presenter.rb
+++ b/app/presenters/event_presenter.rb
@@ -12,6 +12,8 @@ class EventPresenter < Gitlab::View::Presenter::Delegated
# Caching `visible_to_user?` method in the presenter because it might be called multiple times.
delegator_override :visible_to_user?
def visible_to_user?(user = nil)
+ return super(user) unless user
+
@visible_to_user_cache.fetch(user&.id) { super(user) }
end