diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-22 11:32:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-22 11:32:52 +0000 |
commit | 98e299857bc410bbd72ac61cc5f9b6d8f5a7893a (patch) | |
tree | 182e0a62f8ad60c8724e49ad3707ae3f11e072d4 /app/models/news.rb | |
parent | 9733194cceb1db35b54f0b76ab64be68165e5c7d (diff) | |
download | redmine-98e299857bc410bbd72ac61cc5f9b6d8f5a7893a.tar.gz redmine-98e299857bc410bbd72ac61cc5f9b6d8f5a7893a.zip |
Only notify users that can see news (#16134).
git-svn-id: http://svn.redmine.org/redmine/trunk@12914 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r-- | app/models/news.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb index c1f6655a5..b86e3f63d 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -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 |