diff options
Diffstat (limited to 'app/presenters/event_presenter.rb')
-rw-r--r-- | app/presenters/event_presenter.rb | 2 |
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 |