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
Add custom permissions to allow/prevent user from exporting data #608
Comments
How about edit? |
Sorry, can you be more specific with your response? |
Yes, sorry. how about the change (not edit, sorry) permission. Won't that do the job? |
No, it controls whether user can edit the object. Export is much too different. Anyway, I think I will implement this as it's a requirement on my project, and submit a PR. |
Hey there, I had a similar case where I needed to control which users were allowed to import data. One solution to this is to override the modelAdmin's
Anyway, it'd be so much better to have has_(import|export)_permission methods to implement on the modelAdmin instead! |
Sorry, I forgot about this issue. I implemented permissions a while ago on my fork. The implementation does not just hide the export button, but also checks permission when exporting. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I propose adding a per-model permission that would control which users can export data. Import should already be controlled by "create" permission, but at the moment there's no mechanic in place to prevent the user from exporting all data to a file.
The text was updated successfully, but these errors were encountered: