-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to alter ObjectPermissionsFilter #13
Comments
For context, the permissions filter is basically just a wrapper around django-guardian's django-rest-framework-guardian/src/rest_framework_guardian/filters.py Lines 12 to 14 in c38a3b5
That said, you can customize the arguments passed to the shortcut by modifying Does that make sense? edit: I'm asking if that makes sense because I don't actually use django-guardian and don't know if I explained it clearly. If I'm being completely honest, I made this package so that we could move the django-guardian integration out of DRF itself. |
Yeah, I think it makes sense. I'm pretty new to Django and more specifically django-guardian though. I get that in order to get objects from |
I'm having a bit of trouble following the documentation. I have a question regarding how to deal with the permissions using
django-rest-framework-guardian
. I followed the example in which I add the mixing and change the serializer filter backend and permissions class as stated.My problem is, once I enable the backend and class for filter and permissions I don't have permissions for listing an endpoint unless I assign view permission explicitely under django admin. Do you need to assign to users all the default django permissions (add_model, view_model, etc) to a user in order to allow django guardian to deal with the object permissions?
It's a bit of a confusing question but I'm unsure from the documentation how the permissions are dealt with from a view perspective and an object perspective.
The text was updated successfully, but these errors were encountered: