summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 43e67069b70..c76d88b1c7b 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -49,6 +49,7 @@ class Event < ActiveRecord::Base
update_all(updated_at: Time.now)
end
+ # Update Gitlab::ContributionsCalendar#activity_dates if this changes
def contributions
where("action = ? OR (target_type in (?) AND action in (?))",
Event::PUSHED, ["MergeRequest", "Issue"],
@@ -62,7 +63,7 @@ class Event < ActiveRecord::Base
def visible_to_user?(user = nil)
if push?
- true
+ Ability.allowed?(user, :download_code, project)
elsif membership_changed?
true
elsif created_project?