diff options
| author | Tobias Bengfort <tobias.bengfort@posteo.de> | 2019-03-24 00:40:44 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-05 13:56:37 +0200 |
| commit | 581a0f45453f178b8abc0d09bd16ce06309ed33a (patch) | |
| tree | b9ac48689168b46346dbb6aabe726f3285f67531 /docs/topics | |
| parent | 75337a60509fdfdd321a5caf8e30d57fff6b9518 (diff) | |
Refs #30226 -- Added User.get_user_permissions() method.
Added to mirror the existing User.get_group_permissions().
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index becf30e7e6..282eb8ca91 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -180,7 +180,8 @@ Handling authorization in custom backends Custom auth backends can provide their own permissions. The user model will delegate permission lookup functions -(:meth:`~django.contrib.auth.models.User.get_group_permissions()`, +(:meth:`~django.contrib.auth.models.User.get_user_permissions()`, +:meth:`~django.contrib.auth.models.User.get_group_permissions()`, :meth:`~django.contrib.auth.models.User.get_all_permissions()`, :meth:`~django.contrib.auth.models.User.has_perm()`, and :meth:`~django.contrib.auth.models.User.has_module_perms()`) to any @@ -898,6 +899,15 @@ methods and attributes: Boolean. Designates that this user has all permissions without explicitly assigning them. + .. method:: models.PermissionsMixin.get_user_permissions(obj=None) + + .. versionadded:: 3.0 + + Returns a set of permission strings that the user has directly. + + If ``obj`` is passed in, only returns the user permissions for this + specific object. + .. method:: models.PermissionsMixin.get_group_permissions(obj=None) Returns a set of permission strings that the user has, through their |
