diff --git a/TODO b/TODO index e504c1f..bbe497d 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,5 @@ # À faire - * Vérifier requêtes avec CORS : https://stackoverflow.com/questions/35760943/how-can-i-enable-cors-on-django-rest-framework/35761458 * Renommer "Console" en "Plateforme" * Ajouter des help_text à tous les champs + classes enfants. Les traduire. * étudier la possibilité à l'utilisateur, via des variables d'environnement, de configurer un email, une autre BDD, etc. diff --git a/collection/collection/components/api.py b/collection/collection/components/api.py index b867f61..6d8fd2e 100644 --- a/collection/collection/components/api.py +++ b/collection/collection/components/api.py @@ -1,7 +1,7 @@ # API - Django Rest Framework REST_FRAMEWORK = { 'DEFAULT_PERMISSION_CLASSES': [ - 'rest_framework.permissions.IsAdminUser', + 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', ], 'TEST_REQUEST_DEFAULT_FORMAT': 'json', 'UNICODE_JSON': True,