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:
Jean-Philippe Lang
2011-05-22 09:14:36 +00:00
parent 5543ec5f5a
commit 7e1f04bdfb
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -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