From af85d191ad1f8625f4bf3dbea31df00ac5db137e Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Thu, 13 Jul 2023 22:37:53 +0200 Subject: [PATCH] Force authentication for API usage --- spejstore/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spejstore/settings.py b/spejstore/settings.py index 784ecdc..2386909 100644 --- a/spejstore/settings.py +++ b/spejstore/settings.py @@ -171,7 +171,7 @@ REST_FRAMEWORK = { # Use Django's standard `django.contrib.auth` permissions, # or allow read-only access for unauthenticated users. "DEFAULT_PERMISSION_CLASSES": [ - "rest_framework.permissions.IsAuthenticatedOrReadOnly", + "rest_framework.permissions.IsAuthenticated", ], "DEFAULT_AUTHENTICATION_CLASSES": [ "rest_framework.authentication.BasicAuthentication",