#18600: group_required decorator
-------------------------------+---------------------------------
Reporter: daniel.walz@… | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.4
Severity: Normal | Keywords: group authorization
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+---------------------------------
To use view authorization together with groups, a decorator is needed in
the style of @login_required.
I added to contrib.auth.models a function to the class User named
is_in_group(group). For convenience the function handles the argument
group as instance of Group, the name or the primary key of the group.
In contrib.auth.decorators I added a new decorator group_required(group).
--
Ticket URL: <https://code.djangoproject.com/ticket/18600>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.