Open sandeepbalagopal09 opened 4 years ago
We currently don't support this. You'd need to write a custom solution for it. Happy to discuss in case you want to propose a solution to be merged.
I can take it, please assign this issue to me
Please propose a reusable solution here first @vishu1089
I am looking for a solution to check the permission in ModelViewSet so that each of Create, Read, Update and Delete permissions are checked separately.
That is, say if somebody trying to access the api for create an object on
MyModel
, then the permission should check for django's inbuilt add_mymodel permission. I have a role create with this permission added to it. But couldn't find an option to do it using the providedHasPermissionsMixin
mixin. note that I want to check similarly change_mymodel, view_mymodel, delete_mymodel based on the action performed in the api.