mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
Don't reject users that already watch one of the objects (#5754).
git-svn-id: http://svn.redmine.org/redmine/trunk@15313 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9c2545e28d
commit
14234eae39
@ -121,8 +121,8 @@ class WatchersController < ApplicationController
|
||||
scope = User.all.limit(100)
|
||||
end
|
||||
users = scope.active.visible.sorted.like(params[:q]).to_a
|
||||
if @watchables
|
||||
users -= @watchables.map(&:watcher_users).flatten
|
||||
if @watchables && @watchables.size == 1
|
||||
users -= @watchables.first.watcher_users
|
||||
end
|
||||
users
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user