|Reported by:||daniel.walz@…||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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).
Change History (7)
Changed 4 years ago by daniel.walz@…
comment:1 Changed 4 years ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to worksforme
- Status changed from new to closed