mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #15716 - Authentication backends can short-circuit authorization.
Authorization backends can now raise PermissionDenied in "has_perm" and "has_module_perms" to short-circuit authorization process.
This commit is contained in:
committed by
Tim Graham
parent
ebd70d4d00
commit
2e364a0aac
@@ -36,7 +36,11 @@ Minor features
|
||||
:mod:`django.contrib.auth`
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
* ...
|
||||
* Authorization backends can now raise
|
||||
:class:`~django.core.exceptions.PermissionDenied` in
|
||||
:meth:`~django.contrib.auth.models.User.has_perm`
|
||||
and :meth:`~django.contrib.auth.models.User.has_module_perms`
|
||||
to short-circuit permission checking.
|
||||
|
||||
:mod:`django.contrib.formtools`
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user