mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 14:56:01 +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:
@@ -100,6 +100,14 @@ class Journal < ActiveRecord::Base
|
||||
notified.map(&:mail)
|
||||
end
|
||||
|
||||
def watcher_recipients
|
||||
notified = journalized.notified_watchers
|
||||
if private_notes?
|
||||
notified = notified.select {|user| user.allowed_to?(:view_private_notes, journalized.project)}
|
||||
end
|
||||
notified.map(&:mail)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def split_private_notes
|
||||
|
||||
Reference in New Issue
Block a user