On Wed, Nov 9, 2016 at 8:32 AM, Melvyn Sopacua <[email protected]> wrote:
> 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>

I was able to do this by adding a custom admin index page, change_form
and some javascript.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY5b1vd_KMYE7gQayzXtCWVh8dOfCfnizLLszp-4AcCrbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to