#28645: AuthenticationForm's inactive user error isn't raised when using
ModelBackend
-------------------------------------+-------------------------------------
Reporter: Guilherme Junqueira | Owner:
| shangdahao
Type: Bug | Status: new
Component: contrib.auth | Version: 3.1
Severity: Normal | Resolution:
Keywords: 2.1 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by alv2017):
* version: 1.11 => 3.1
Comment:
I'm using Django 3.1, and I spent some time on figuring the issue with
ModelBackend.authenticate() method. In my application I was willing to
authenticate active and inactive users, and the default ModelBackend is
not designed to do this.
In Django 3.1 there is a class (backends.py) AllowAllUsersModelBackend
that inherits all the functionality from the ModelBackend class and
permits authentication of active and inactive users.
PS: The problem seems to be solved, however it took me some time to figure
the things out.
--
Ticket URL: <https://code.djangoproject.com/ticket/28645#comment:19>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.79abffcd356f71a9158e12564955b756%40djangoproject.com.