diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-09-07 18:08:55 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-07 18:08:55 +0300 |
commit | 124cece3b39f5cc38686df39c179b1a61ecbd562 (patch) | |
tree | 3b5ea888156c05fe8cd6a6cab69cbd9721d565a7 /app/finders/user_recent_events_finder.rb | |
parent | 272281e4729c9e2193acea84394a191cfe2496af (diff) |
Include private contributions in user contribution graph
Diffstat (limited to 'app/finders/user_recent_events_finder.rb')
-rw-r--r-- | app/finders/user_recent_events_finder.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/app/finders/user_recent_events_finder.rb b/app/finders/user_recent_events_finder.rb index 876f086a3ef..b874f6959c9 100644 --- a/app/finders/user_recent_events_finder.rb +++ b/app/finders/user_recent_events_finder.rb @@ -48,20 +48,6 @@ class UserRecentEventsFinder end def projects - # Compile a list of projects `current_user` interacted with - # and `target_user` is allowed to see. - - authorized = target_user - .project_interactions - .joins(:project_authorizations) - .where(project_authorizations: { user: current_user }) - .select(:id) - - visible = target_user - .project_interactions - .where(visibility_level: Gitlab::VisibilityLevel.levels_for_user(current_user)) - .select(:id) - - Gitlab::SQL::Union.new([authorized, visible]).to_sql + target_user.project_interactions.to_sql end end |