diff options
| author | Tobias Bengfort <tobias.bengfort@posteo.de> | 2018-11-12 16:44:22 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-11-12 10:44:43 -0500 |
| commit | b2ede89337f613caacdfe34f34df69b25e9b104f (patch) | |
| tree | 01f0e50c94ea40bafbbb64c171cbd7cb86fe2e0a | |
| parent | ae35cd3dcbaa06b11ab74ba1f6b47b7407e48f6a (diff) | |
[2.1.x] Doc'd PermissionsMixin's usage of User.is_active and is_superuser.
Backport of b1243a55a5916ed08a726b011bc05d40f717ef40 from master.
| -rw-r--r-- | docs/topics/auth/customizing.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 963bbd3176..b5cb3cf6c1 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -925,8 +925,9 @@ methods and attributes: Returns ``True`` if the user has the specified permission, where ``perm`` is in the format ``"<app label>.<permission codename>"`` (see - :ref:`permissions <topic-authorization>`). If the user is inactive, this method will - always return ``False``. + :ref:`permissions <topic-authorization>`). If :attr:`.User.is_active` + and :attr:`~.User.is_superuser` are both ``True``, this method always + returns ``True``. If ``obj`` is passed in, this method won't check for a permission for the model, but for this specific object. @@ -935,8 +936,9 @@ methods and attributes: Returns ``True`` if the user has each of the specified permissions, where each perm is in the format - ``"<app label>.<permission codename>"``. If the user is inactive, - this method will always return ``False``. + ``"<app label>.<permission codename>"``. If :attr:`.User.is_active` and + :attr:`~.User.is_superuser` are both ``True``, this method always + returns ``True``. If ``obj`` is passed in, this method won't check for permissions for the model, but for the specific object. @@ -944,8 +946,9 @@ methods and attributes: .. method:: models.PermissionsMixin.has_module_perms(package_name) Returns ``True`` if the user has any permissions in the given package - (the Django app label). If the user is inactive, this method will - always return ``False``. + (the Django app label). If :attr:`.User.is_active` and + :attr:`~.User.is_superuser` are both ``True``, this method always + returns ``True``. .. admonition:: ``PermissionsMixin`` and ``ModelBackend`` |
