diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-09-07 15:08:55 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-07 15:08:55 +0000 |
commit | 124cece3b39f5cc38686df39c179b1a61ecbd562 (patch) | |
tree | 3b5ea888156c05fe8cd6a6cab69cbd9721d565a7 /app/models/event.rb | |
parent | 272281e4729c9e2193acea84394a191cfe2496af (diff) | |
download | gitlab-ce-124cece3b39f5cc38686df39c179b1a61ecbd562.tar.gz |
Include private contributions in user contribution graph
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index ba28866e8e6..041dac6941b 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -151,15 +151,17 @@ class Event < ActiveRecord::Base if push? || commit_note? Ability.allowed?(user, :download_code, project) elsif membership_changed? - true + Ability.allowed?(user, :read_project, project) elsif created_project? - true + Ability.allowed?(user, :read_project, project) elsif issue? || issue_note? Ability.allowed?(user, :read_issue, note? ? note_target : target) elsif merge_request? || merge_request_note? Ability.allowed?(user, :read_merge_request, note? ? note_target : target) + elsif milestone? + Ability.allowed?(user, :read_project, project) else - milestone? + false # No other event types are visible end end |