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:
parent
9733194cce
commit
98e299857b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue