From: Jean-Philippe Lang Date: Sun, 23 Feb 2014 08:15:37 +0000 (+0000) Subject: Merged r12914 (#16134). X-Git-Tag: 2.5.0~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88b3872179b2174d022f85aa043c11d00fe4e886;p=redmine.git Merged r12914 (#16134). git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@12922 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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