mirror of
https://github.com/redmine/redmine.git
synced 2025-12-21 16:00:30 +01:00
Fixed that watchers receive notifications for private comments without permission (#12286).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10789 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -67,15 +67,18 @@ module Redmine
|
||||
!!(user && self.watcher_user_ids.detect {|uid| uid == user.id })
|
||||
end
|
||||
|
||||
# Returns an array of watchers' email addresses
|
||||
def watcher_recipients
|
||||
def notified_watchers
|
||||
notified = watcher_users.active
|
||||
notified.reject! {|user| user.mail_notification == 'none'}
|
||||
|
||||
notified.reject! {|user| user.mail.blank? || user.mail_notification == 'none'}
|
||||
if respond_to?(:visible?)
|
||||
notified.reject! {|user| !visible?(user)}
|
||||
end
|
||||
notified.collect(&:mail).compact
|
||||
notified
|
||||
end
|
||||
|
||||
# Returns an array of watchers' email addresses
|
||||
def watcher_recipients
|
||||
notified_watchers.collect(&:mail)
|
||||
end
|
||||
|
||||
module ClassMethods; end
|
||||
|
||||
Reference in New Issue
Block a user