summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJoshua Cannon <joshua.cannon@ni.com>2018-12-13 10:14:03 -0600
committerTim Graham <timograham@gmail.com>2019-01-09 20:01:04 -0500
commitdb1b10ef0dcab2b8bacbea4adc681a57bd70b462 (patch)
tree98e5de16c2ba4a77d52bb0fc61c3b9b2da2f0473 /docs
parent4ca2820ff573ed87c70fedda69efa8de23955669 (diff)
Fixed #30037 -- Added request arg to RemoteUserBackend.configure_user().
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/ref/contrib/auth.txt11
-rw-r--r--docs/releases/2.2.txt7
3 files changed, 19 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 8c81744e17..0e85e59e8c 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -29,6 +29,9 @@ details on these changes.
* ``django.contrib.staticfiles.storage.CachedStaticFilesStorage`` will be
removed.
+* ``RemoteUserBackend.configure_user()`` will require ``request`` as the first
+ positional argument.
+
.. _deprecation-removed-in-3.0:
3.0
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 0dfa3a9261..efbffa62c2 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -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
diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt
index 150fe413db..7cb5c84475 100644
--- a/docs/releases/2.2.txt
+++ b/docs/releases/2.2.txt
@@ -55,7 +55,8 @@ Minor features
:mod:`django.contrib.auth`
~~~~~~~~~~~~~~~~~~~~~~~~~~
-* ...
+* The ``HttpRequest`` is now passed as the first positional argument to
+ :meth:`.RemoteUserBackend.configure_user`, if it accepts it.
:mod:`django.contrib.contenttypes`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -505,3 +506,7 @@ Miscellaneous
* ``django.contrib.staticfiles.storage.CachedStaticFilesStorage`` is
deprecated due to the intractable problems that is has. Use
:class:`.ManifestStaticFilesStorage` or a third-party cloud storage instead.
+
+* :meth:`.RemoteUserBackend.configure_user` is now passed ``request`` as the
+ first positional argument, if it accepts it. Support for overrides that don't
+ accept it will be removed in Django 3.1.