fix_wiking_2329.diff
app/controllers/mentions_controller.rb (working copy) | ||
---|---|---|
21 | 21 |
Mention.find(:all, options.merge( |
22 | 22 |
:conditions => { :mentioned_id => @user.id }, |
23 | 23 |
:order => "created_on DESC")).each do |mention| |
24 |
if mention.title.present? && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?) |
|
24 |
if mention.title.present? && User.current.member_of?(mention.project) && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?)
|
|
25 | 25 |
mentions << mention |
26 | 26 |
count += 1 |
27 | 27 |
end |
app/views/wiking/_mentions.html.erb (working copy) | ||
---|---|---|
3 | 3 |
<% Mention.find(:all, |
4 | 4 |
:conditions => { :mentioned_id => @user.id }, |
5 | 5 |
:order => "created_on DESC").each do |mention| |
6 |
if mention.title.present? && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?) |
|
6 |
if mention.title.present? && User.current.member_of?(mention.project) && (!mention.mentioning.respond_to?(:visible?) || mention.mentioning.visible?)
|
|
7 | 7 |
mentions << mention |
8 | 8 |
count += 1 |
9 | 9 |
break if count == 10 |