mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00: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:
parent
f09e0e8f8c
commit
b270a38928
@ -31,7 +31,7 @@ module Redmine
|
|||||||
|
|
||||||
# Returns an array of users that are proposed as watchers
|
# Returns an array of users that are proposed as watchers
|
||||||
def addable_watcher_users
|
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?)
|
if respond_to?(:visible?)
|
||||||
users.reject! {|user| user.is_a?(User) && !visible?(user)}
|
users.reject! {|user| user.is_a?(User) && !visible?(user)}
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user