mytardis/mytardis — pull request #66 by tjdett (2012-03-14 04:17:13+00:00)
Title: Fix user completion for Group Management

This is pretty much a complete rewrite of the `manage_group_members.html` javascript to handle the JSON output from `/ajax/user_list`.

The previous implementation was completely broken. The new implementation:

1. Filter out users which don't match the selected authentication method
2. Checks the following user fields to see if they contain a string match: `username`, `email`, `first_name`, `last_name`
3. Outputs formatted labels for the users it returns.

While I've tried to keep it efficient, I've no idea how it will handle thousands of users. I suspect you could get better performance by reducing the number of fields searched, or returning no results until you've got a couple of characters. In any case, it should be asynchronous, so hopefully the delay won't be noticeable.