From b270a389281ce37bb3bea6cec68ba7a6ac54dfcb Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 25 Apr 2020 08:00:55 +0000 Subject: [PATCH] Use principals in acts_as_watchable (#4511). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19725 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb index e37151d8f..bb04eb7f0 100644 --- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb @@ -31,7 +31,7 @@ module Redmine # Returns an array of users that are proposed as watchers def addable_watcher_users - users = (self.project.users.sort + self.project.principals.merge(Group.givable).sort) - self.watcher_users + users = self.project.principals.where(:users => {:type => ['User', 'Group']}).sort - self.watcher_users if respond_to?(:visible?) users.reject! {|user| user.is_a?(User) && !visible?(user)} end