summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-04-25 08:01:59 +0000
committerGo MAEDA <maeda@farend.jp>2020-04-25 08:01:59 +0000
commitee46c3570ec5f3948a94adedfdefd734822f95af (patch)
treec29ca1a1d9a16cf402d41ee339f3769b891b4261 /lib/plugins
parentb270a389281ce37bb3bea6cec68ba7a6ac54dfcb (diff)
downloadredmine-ee46c3570ec5f3948a94adedfdefd734822f95af.tar.gz
redmine-ee46c3570ec5f3948a94adedfdefd734822f95af.zip
Use scope assignable_watchers (#4511).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19726 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-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 bb04eb7f0..6b16e18a5 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.principals.where(:users => {:type => ['User', 'Group']}).sort - self.watcher_users
+ users = self.project.principals.assignable_watchers.sort - self.watcher_users
if respond_to?(:visible?)
users.reject! {|user| user.is_a?(User) && !visible?(user)}
end