summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTobias Bengfort <tobias.bengfort@posteo.de>2019-03-08 17:48:50 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-06-05 13:39:46 +0200
commit75337a60509fdfdd321a5caf8e30d57fff6b9518 (patch)
treef69d37eaa5a1be92bf82ae089744d73b59506de1 /docs/ref
parent4b6dfe16226a81fea464ac5f77942f4d6ba266e8 (diff)
Fixed #30226 -- Added BaseBackend for authentication.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/auth.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 12186f19b7..17197e9fc7 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -460,6 +460,27 @@ Available authentication backends
The following backends are available in :mod:`django.contrib.auth.backends`:
+.. class:: BaseBackend
+
+ .. versionadded:: 3.0
+
+ A base class that provides default implementations for all required
+ methods. By default, it will reject any user and provide no permissions.
+
+ .. method:: get_group_permissions(user_obj, obj=None)
+
+ Returns an empty set.
+
+ .. method:: get_all_permissions(user_obj, obj=None)
+
+ Uses :meth:`get_group_permissions` to get the set of permission strings
+ the ``user_obj`` has.
+
+ .. method:: has_perm(user_obj, perm, obj=None)
+
+ Uses :meth:`get_all_permissions` to check if ``user_obj`` has the
+ permission string ``perm``.
+
.. class:: ModelBackend
This is the default authentication backend used by Django. It