Only notify users that can see news (#16134).

git-svn-id: http://svn.redmine.org/redmine/trunk@12914 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-02-22 11:32:52 +00:00
parent 9733194cce
commit 98e299857b
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class News < ActiveRecord::Base
end
def recipients
project.users.select {|user| user.notify_about?(self)}.map(&:mail)
project.users.select {|user| user.notify_about?(self) && user.allowed_to?(:view_news, project)}.map(&:mail)
end
# Returns the email addresses that should be cc'd when a new news is added