Add management command to logout all users.

This is intended to be used logging out users during our deployment of
the UserProfile merge, but it could be useful for other things too.

(imported from commit bfe896d854f997f7a4d06e5bc0f19ec5b1aa5e69)
This commit is contained in:
Tim Abbott
2013-04-02 12:00:12 -04:00
parent 303e77c07d
commit 3a35c5b00c
2 changed files with 26 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ def delete_user_sessions(user_profile):
if session.get_decoded().get('_auth_user_id') == user_profile.user.id:
delete_session(session)
def delete_realm_sessions(realm):
def delete_realm_user_sessions(realm):
realm_user_ids = [u.user.id for u in
UserProfile.objects.filter(realm=realm)]
for session in Session.objects.all():