From 30b7a1cc4d5b9f200e11ba951260202229fdaadf Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 1 Mar 2023 09:57:57 +0100 Subject: [PATCH] merge --- padel/settings.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/padel/settings.py b/padel/settings.py index bc7d904..ff6afa8 100644 --- a/padel/settings.py +++ b/padel/settings.py @@ -114,9 +114,12 @@ AUTH_PASSWORD_VALIDATORS = [ REST_FRAMEWORK = { # Use Django's standard `django.contrib.auth` permissions, # or allow read-only access for unauthenticated users. - 'DEFAULT_PERMISSION_CLASSES': [ - 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', - 'rest_framework.authentication.BasicAuthentication' + 'DEFAULT_AUTHENTICATION_CLASSES': [ + 'rest_framework.authentication.BasicAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ],'DEFAULT_PERMISSION_CLASSES': [ + # 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' + 'rest_framework.permissions.IsAdminUser', ] }