#27902: user_can_authenticate prevents confirm_login_allowed from checking 
inactive
user
-------------------------------------+-------------------------------------
     Reporter:  Brandon Chinn        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.auth         |                  Version:  1.10
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  authentication,      |             Triage Stage:
  inactive                           |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Brandon Chinn):

 * status:  new => closed
 * resolution:   => wontfix


Old description:

> 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.

New description:

 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)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/27902#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.7bebc5ff8c8126073cdbe0de544d852a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to