Enhance dealing with inactive users

Review Request #278 — Created Feb. 26, 2008 and submitted

Information

Review Board SVN (deprecated)
trunk

Reviewers

We generally don't want to delete user accounts, because that will delete all of their associated items as well.  For posterity's sake, we instead choose to disable user accounts that should no longer have access.  However, there are currently only a few places where the is_active flag is considered.

This patch does basically 4 things:

1. Display the is_active flag in the admin user list (/admin/auth/user/).  I'm not thrilled about overriding implementation-specific details, but it works.

2. Filter inactive users from the "All Submitters" list (/users).

3. Filter inactive users from all email notifications, whether they’re addressed specifically or they’re included in a review group.

4. Show a strikethrough on inactive targetted users, to give a visual cue that they won't be included on any further messages.  This way, existing review requests will still show that the inactive user was included.  Inactive users don't show in the auto-complete results, but they can be entered manually.  This is necessary so if you add a new person to a review that already contains an inactive target person, the inactive one won't be lost when it is saved.

There's a slight bug in [4] that the strikethrough is missing when first setting the field.  I don't know how to format the result of the /set/target_people JSON call.

UPDATE (diff revision 2):
- Remove __exact from filters, as it's implied anyway.
- Fix the spacing on '{%' blocks.
I manually verified that the 4 features claimed above seem to work as advertised.
chipx86
  1. Looks good, just a couple things.
  2. /trunk/reviewboard/reviews/datagrids.py (Diff revision 1)
     
     
    Do we need __exact? Isn't this implied?
    1. I didn't give it much thought actually -- the filter in webapi.json.user_list is written the same way.  I think you're right that it's implied, so I can remove all the __exact's.
  3. Space after {% in both cases. I don't know why it's without a space in the other tags on this line, but that's incorrect. Would you mind taking care of those too?
    1. Sure, no problem.  There are other places in reviewboard and djblets that do this too, so it might be worth a quick audit.
  4. 
      
chipx86
  1. Looks great! Committed to SVN (r1208). Thanks!
  2.