#30348: Add superuser_required decorator
------------------------------+--------------------------------------
Reporter: Sultan Iman | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Comment (by Sultan Iman):
Replying to [comment:1 Tobias Kunze]:
> Summing up the discussion on the GitHub PR here:
>
> On the plus side, Django does provide very similar decorators and
mixins, so it is surprising that `superuser_required` is not already a
part of Django.
>
> On the other hand, adding a decorator like this is trivial with
`user_passes_test`. We could add a decorator like this to the
``user_passes_test`` documentation, to make sure searching for this
(fairly reasonable) requirement yields helpful information.
Hi Tobias,
Thanks for reviewing! Also agree that it is easily achievable. However I
believe providing these out of the box is a good developer experience as
well as convenience.
---
Kind regards,
Sultan.
--
Ticket URL: <https://code.djangoproject.com/ticket/30348#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.fafa248f0440a50182c7504a4d972b07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.