Do not propose users that can't view an issue as watchers (#7412).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5876 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -31,7 +31,11 @@ module Redmine
|
||||
|
||||
# Returns an array of users that are proposed as watchers
|
||||
def addable_watcher_users
|
||||
self.project.users.sort - self.watcher_users
|
||||
users = self.project.users.sort - self.watcher_users
|
||||
if respond_to?(:visible?)
|
||||
users.reject! {|user| !visible?(user)}
|
||||
end
|
||||
users
|
||||
end
|
||||
|
||||
# Adds user as a watcher
|
||||
|
||||
Reference in New Issue
Block a user