diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-19 21:08:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-19 21:08:39 +0300 |
commit | ce493944f48fb2ad08a5381a7ed1f37ced637bd1 (patch) | |
tree | 565c5c3bf18ce60fd6442d7581fc1af7ba148dd1 /app/finders | |
parent | e9ea5bbdf998d0bafe14cfd3d70fa545d8ebed83 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/user_recent_events_finder.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/finders/user_recent_events_finder.rb b/app/finders/user_recent_events_finder.rb index 3f2e813d381..e9136919a7e 100644 --- a/app/finders/user_recent_events_finder.rb +++ b/app/finders/user_recent_events_finder.rb @@ -46,7 +46,7 @@ class UserRecentEventsFinder SQL # Workaround for https://github.com/rails/rails/issues/24193 - Event.from([Arel.sql(sql)]) + ensure_design_visibility(Event.from([Arel.sql(sql)])) end # rubocop: enable CodeReuse/ActiveRecord @@ -59,4 +59,11 @@ class UserRecentEventsFinder def projects target_user.project_interactions.to_sql end + + # TODO: remove when the :design_activity_events feature flag is removed. + def ensure_design_visibility(events) + return events if Feature.enabled?(:design_activity_events) + + events.not_design + end end |