On Tuesday 08 November 2016 09:55:51 Larry Martell wrote:
> I need to add a configurable data filter that will be used in my app
> and I want that filter to be specifiable at the django group level. I
> want to be able to give users permission, both at the group level and
> the user level, to edit this filter. But I want that permission to be
> separate and distinct from the general change group permission.
>
> Anyone have a method to do this?
By design, you cannot relax permissions. You can grant and re-deny
though or re-implement how change permission is determined. Wether you
can determine "I should grant Change permission, even though the group
doesn't have it, because the request is for editing the filter *only*"
is tricky.
To grant change permission and then override it later, use the "user
passes test" mechanism:
<
https://docs.djangoproject.com/en/1.10/topics/auth/default/#django.contrib.auth.decorators.user_passes_test>
--
Melvyn Sopacua