summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-12-26 09:14:10 -0500
committerTim Graham <timograham@gmail.com>2014-12-26 09:14:10 -0500
commitc5fb34c47ef43fbd54e11fa6e72de326f5453f98 (patch)
tree9c5dfb5538d77fb86e484437025b0e46ad81a4bf /docs/ref
parent271d4f8f85edf6dacc391ff5ddf601e3ee185b53 (diff)
Documented AdminSite.has_permission(); refs #22295.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index fb8b6ac150..a1d4c3a563 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -2515,6 +2515,17 @@ Templates can override or extend base admin templates as described in
Path to a custom template that will be used by the admin site password
change done view.
+``AdminSite`` methods
+---------------------
+
+.. method:: AdminSite.has_permission(request)
+
+ Returns ``True`` if the user for the given ``HttpRequest`` has permission
+ to view at least one page in the admin site. Defaults to requiring both
+ :attr:`User.is_active <django.contrib.auth.models.User.is_active>` and
+ :attr:`User.is_staff <django.contrib.auth.models.User.is_staff>` to be
+ ``True``.
+
Hooking ``AdminSite`` instances into your URLconf
-------------------------------------------------