]> source.dussan.org Git - redmine.git/commitdiff
Merged r12914 (#16134).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Feb 2014 08:15:37 +0000 (08:15 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Feb 2014 08:15:37 +0000 (08:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@12922 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/news.rb

index c1f6655a540f039b830866eebed9e143d72bbe4b..b86e3f63d233993e91301761abd695acb2fae7f8 100644 (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