Opened 8 years ago

Closed 8 years ago

#27902 closed Bug (wontfix)

user_can_authenticate prevents confirm_login_allowed from checking inactive user

Reported by: Brandon Chinn Owned by: nobody
Component: contrib.auth Version: 1.10
Severity: Normal Keywords: authentication, inactive
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Brandon Chinn)

With the addition of ModelBackend.user_can_authenticate, ModelBackend.authenticate now returns None if a user is inactive. Because of that, AuthenticationForm.clean will set self.user_cache to be None and will error with the invalid_login message instead of the inactive message.

Not sure how we want this to be solved, but I'll try to put up a patch resolving this issue and see if that's the direction we want to take.

UPDATE: didn't see that AllowAllUsersModelBackend was made for this purpose (auth_tests/test_forms.py:245)

Change History (1)

comment:1 by Brandon Chinn, 8 years ago

Description: modified (diff)
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top