when offering watchers, only offer those users who are visible

pull/1186/head
Philipp Tessenow 12 years ago
parent 80adcc2b30
commit 64418fc8fd
  1. 6
      lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb

@ -32,7 +32,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

Loading…
Cancel
Save