mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30037 -- Added request arg to RemoteUserBackend.configure_user().
This commit is contained in:
committed by
Tim Graham
parent
4ca2820ff5
commit
db1b10ef0d
@@ -611,13 +611,22 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
information) prior to using it to get or create a user object. Returns
|
||||
the cleaned username.
|
||||
|
||||
.. method:: configure_user(user)
|
||||
.. method:: configure_user(request, user)
|
||||
|
||||
Configures a newly created user. This method is called immediately
|
||||
after a new user is created, and can be used to perform custom setup
|
||||
actions, such as setting the user's groups based on attributes in an
|
||||
LDAP directory. Returns the user object.
|
||||
|
||||
``request`` is an :class:`~django.http.HttpRequest` and may be ``None``
|
||||
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
|
||||
(which passes it on to the backend).
|
||||
|
||||
.. versionchanged:: 2.2
|
||||
|
||||
The ``request`` argument was added. Support for method overrides
|
||||
that don't accept it will be removed in Django 3.1.
|
||||
|
||||
.. method:: user_can_authenticate()
|
||||
|
||||
Returns whether the user is allowed to authenticate. This method
|
||||
|
||||
Reference in New Issue
Block a user