Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Made modwsgi groups_for_user consistent with check_password

2b5f848 based its changes on #19061
that made the is_active attribute mandatory for user models.
The try/except was not removed for the groups_for_user function.

refs #19780
  • Loading branch information...
1 parent 718afca commit 0e18fb04bad99de237b5eb8ea4f9ff2f3cd147d3 @ptone ptone committed
Showing with 1 addition and 5 deletions.
  1. +1 −5 django/contrib/auth/handlers/
6 django/contrib/auth/handlers/
@@ -40,11 +40,7 @@ def groups_for_user(environ, username):
user = UserModel._default_manager.get_by_natural_key(username)
except UserModel.DoesNotExist:
return []
- try:
- if not user.is_active:
- return []
- except AttributeError as e:
- # a custom user may not support is_active
+ if not user.is_active:
return []
return [force_bytes( for group in user.groups.all()]

0 comments on commit 0e18fb0

Please sign in to comment.
Something went wrong with that request. Please try again.