I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

fix_wiking_2329.diff

Proposed patch - Robert Roth, 15 Sep 2014 06:21

Download (1.48 KB)

View differences:

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
Terms of use | Privacy policy