dimagi/commcare-hq — pull request #3735 by NoahCarnahan (2014-06-27 21:24:57+00:00)
Title: Sort users by role on the "Web Users & Roles" page

Addresses this ticket: http://manage.dimagi.com/default.asp?115971

This change sorts the list of web users on the "Web Users & Roles" page by alphabetically by role and then by email address. This is accomplished by overriding the `web_users` method of the `ListWebUsersView`. `web_users` is originally defined on `BaseUserSettingsView`, the immediate ancestor of `ListWebUsersView` (see `corehq/apps/users/views/__init__.py:84`). I chose not to alter this method so as not to change the behavior of other pages.

I'm definitely not sure if there is another place that might be more appropriate to do this sorting, so feedback would be appreciated. It might be possible to sort in the template itself?