mirror of https://github.com/django/django.git
[2.2.x] Fixed #28588 -- Doc'd User.has_perm() & co. behavior for active superusers.
Equivalent note for PermissionsMixin was added ind33864ed13
. Backport of4b32d039db
from master
This commit is contained in:
parent
b9d1bb6955
commit
b6d8957356
|
@ -220,7 +220,8 @@ Methods
|
|||
Returns ``True`` if the user has the specified permission, where perm
|
||||
is in the format ``"<app label>.<permission codename>"``. (see
|
||||
documentation on :ref:`permissions <topic-authorization>`). If the user is
|
||||
inactive, this method will always return ``False``.
|
||||
inactive, this method will always return ``False``. For an active
|
||||
superuser, this method will always return ``True``.
|
||||
|
||||
If ``obj`` is passed in, this method won't check for a permission for
|
||||
the model, but for this specific object.
|
||||
|
@ -230,7 +231,8 @@ Methods
|
|||
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``.
|
||||
this method will always return ``False``. For an active superuser, this
|
||||
method will always return ``True``.
|
||||
|
||||
If ``obj`` is passed in, this method won't check for permissions for
|
||||
the model, but for the specific object.
|
||||
|
@ -239,7 +241,8 @@ Methods
|
|||
|
||||
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``.
|
||||
always return ``False``. For an active superuser, this method will
|
||||
always return ``True``.
|
||||
|
||||
.. method:: email_user(subject, message, from_email=None, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue