Skip to content
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

Different permission for DRF CRUD #121

Open
sandeepbalagopal09 opened this issue Sep 1, 2020 · 1 comment
Open

Different permission for DRF CRUD #121

sandeepbalagopal09 opened this issue Sep 1, 2020 · 1 comment

Comments

@sandeepbalagopal09
Copy link

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 provided HasPermissionsMixin mixin. note that I want to check similarly change_mymodel, view_mymodel, delete_mymodel based on the action performed in the api.

@filipeximenes
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants