mirror of
https://github.com/redmine/redmine.git
synced 2025-11-18 03:00:52 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user