#24929: permission_required decorator should take any iterable if permissions
--------------------------------------+--------------------
Reporter: raphaelm | Owner:
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
As it came up in the discussion on ticket #24914 on GitHub
(https://github.com/django/django/pull/4749#discussion_r31776720), there
is no reason why permission_required only takes lists and tuples of
permissions, while `has_perm` itself can take any iterable. To be
consistent with the new mixins and other parts of Django where boths
strings and iterables of strings are accepted (see e.g.
model._meta.ordering), we should change this logic. I will prepare a pull
request with the same logic that is used in other places.
--
Ticket URL: <https://code.djangoproject.com/ticket/24929>
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/051.749d45b2bef1e616398f574185b6c0f8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.