#30348: Add superuser_required decorator
------------------------------+---------------------------------------
Reporter: Sultan Iman | Owner: Sultan Iman
Type: New feature | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by Carlton Gibson):
* status: assigned => closed
* resolution: => wontfix
Comment:
Hi all. On review I think we should close this as wontfix.
I agree with David's comment:5. It's questionable whether you should this
at all: to the extent that it's possible, you should avoid creating and
having superusers — use the permissions system.
Then, if you really do want this, it's a one-liner with
`user_passes_test()`. (Given the previous point, I'm not inclined to add
that example to the docs. Folks who want it will work it out.)
I hope that makes sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/30348#comment:9>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.23b4ee4d78dcfe009aabe4dd17500535%40djangoproject.com.