From 53c3b08a362d272c22478d6db3b0017f480c0f6f Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Tue, 19 Dec 2023 11:05:11 +0100 Subject: [PATCH] fix: allow `dumpdata` API access for all authenticated users --- apis_core/core/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apis_core/core/views.py b/apis_core/core/views.py index 8a5d4a0b7..f47b740b8 100644 --- a/apis_core/core/views.py +++ b/apis_core/core/views.py @@ -2,6 +2,7 @@ from rest_framework.views import APIView from rest_framework.response import Response +from rest_framework.permissions import IsAuthenticated from apis_core.utils.helpers import datadump_serializer @@ -16,6 +17,8 @@ class Dumpdata(APIView): so basically: serialize -> deserialize -> serialize """ + permission_classes = [IsAuthenticated] + def get(self, request, *args, **kwargs): params = request.query_params.dict() app_labels = params.pop("app_labels", [])