Feature #4511 » 0003-Use-principals-in-acts_as_watchable.patch
| lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | ||
|---|---|---|
|
# Returns an array of users that are proposed as watchers
|
||
|
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?)
|
||
|
users.reject! {|user| user.is_a?(User) && !visible?(user)}
|
||
|
end
|
||