Closed simonw closed 3 years ago
Django expects permissions to be attached to model classes. It's possible to workaround this but the workarounds are a bit nasty: https://stackoverflow.com/questions/13932774/how-can-i-use-django-permissions-without-defining-a-content-type-or-model
I'm going to accelerate work on the Dashboard
model that will allow dashboard configurations to be saved to the database.
I was going to change this to superuser-only, but having it use a permission would both enable superuser access and allow other users to be granted access too.
https://docs.djangoproject.com/en/3.1/topics/auth/default/
I'm going to call the first new permission
django_sql_dashboard.execute_sql
.