mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #35678 -- Removed "usable_password" field from BaseUserCreationForm.
Refs #34429: Following the implementation allowing the setting of
unusable passwords via the admin site, the `BaseUserCreationForm` and
`UserCreationForm` were extended to include a new field for choosing
whether password-based authentication for the new user should be enabled
or disabled at creation time.
Given that these forms are designed to be extended when implementing
custom user models, this branch ensures that this new field is moved to
a new, admin-dedicated, user creation form `AdminUserCreationForm`.
Regression in e626716c28.
Thanks Simon Willison for the report, Fabian Braun and Sarah Boyce for
the review.
This commit is contained in:
@@ -12,3 +12,9 @@ Bugfixes
|
||||
* Fixed a regression in Django 5.1 that caused a crash of ``Window()`` when
|
||||
passing an empty sequence to the ``order_by`` parameter, and a crash of
|
||||
``Prefetch()`` for a sliced queryset without ordering (:ticket:`35665`).
|
||||
|
||||
* Fixed a regression in Django 5.1 where a new ``usable_password`` field was
|
||||
included in :class:`~django.contrib.auth.forms.BaseUserCreationForm` (and
|
||||
children). A new :class:`~django.contrib.auth.forms.AdminUserCreationForm`
|
||||
including this field was added, isolating the feature to the admin where it
|
||||
was intended (:ticket:`35678`).
|
||||
|
||||
@@ -118,11 +118,11 @@ Minor features
|
||||
* The default ``parallelism`` of the ``ScryptPasswordHasher`` is
|
||||
increased from 1 to 5, to follow OWASP recommendations.
|
||||
|
||||
* :class:`~django.contrib.auth.forms.BaseUserCreationForm` and
|
||||
:class:`~django.contrib.auth.forms.AdminPasswordChangeForm` now support
|
||||
disabling password-based authentication by setting an unusable password on
|
||||
form save. This is now available in the admin when visiting the user creation
|
||||
and password change pages.
|
||||
* The new :class:`~django.contrib.auth.forms.AdminUserCreationForm` and
|
||||
the existing :class:`~django.contrib.auth.forms.AdminPasswordChangeForm` now
|
||||
support disabling password-based authentication by setting an unusable
|
||||
password on form save. This is now available in the admin when visiting the
|
||||
user creation and password change pages.
|
||||
|
||||
* :func:`~.django.contrib.auth.decorators.login_required`,
|
||||
:func:`~.django.contrib.auth.decorators.permission_required`, and
|
||||
|
||||
Reference in New Issue
Block a user