summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-04-25 08:00:55 +0000
committerGo MAEDA <maeda@farend.jp>2020-04-25 08:00:55 +0000
commitb270a389281ce37bb3bea6cec68ba7a6ac54dfcb (patch)
tree0927d25b1069d5823177d3154e59aa9b05703368 /lib
parentf09e0e8f8c0ca17acb856f7d562524e21291e241 (diff)
downloadredmine-b270a389281ce37bb3bea6cec68ba7a6ac54dfcb.tar.gz
redmine-b270a389281ce37bb3bea6cec68ba7a6ac54dfcb.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb2
1 files changed, 1 insertions, 1 deletions
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