mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #24253 -- Documented staff_member_required decorator.
This commit is contained in:
parent
b089759d60
commit
e8a758e941
2 changed files with 35 additions and 1 deletions
|
@ -485,7 +485,15 @@ The login_required decorator
|
|||
|
||||
.. note::
|
||||
|
||||
The login_required decorator does NOT check the is_active flag on a user.
|
||||
The ``login_required`` decorator does NOT check the ``is_active`` flag on a
|
||||
user.
|
||||
|
||||
.. seealso::
|
||||
|
||||
If you are writing custom views for Django's admin (or need the same
|
||||
authorization check that the built-in views use), you may find the
|
||||
:func:`django.contrib.admin.views.decorators.staff_member_required`
|
||||
decorator a useful alternative to ``login_required()``.
|
||||
|
||||
Limiting access to logged-in users that pass a test
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue