FJNR-inc / dry-rest-permissions

Rules based permissions for the Django Rest Framework
ISC License
75 stars 11 forks source link

Create permissions for related object #28

Open bodgerbarnett opened 2 years ago

bodgerbarnett commented 2 years ago

How do I prevent anyone other than certain users creating objects that have a relation to the (in your example) organisation?

So if I have an object called Venue which has a foreign key to Organisation, how do I prevent anyone apart from users in that organisation from creating Venues for it?

Is the only way to do it to use the serializer or can I use this app for that too somehow?