From d7a31aeeef637cdb20c3882d585d613a38b0af71 Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Thu, 7 Nov 2024 12:16:07 -0500 Subject: [PATCH] Remove all dataset modification endpoints --- uvdat/core/rest/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uvdat/core/rest/dataset.py b/uvdat/core/rest/dataset.py index 81547fe8..dabcdf29 100644 --- a/uvdat/core/rest/dataset.py +++ b/uvdat/core/rest/dataset.py @@ -2,7 +2,7 @@ from rest_framework import serializers from rest_framework.decorators import action from rest_framework.response import Response -from rest_framework.viewsets import ModelViewSet +from rest_framework.viewsets import ReadOnlyModelViewSet from uvdat.core.models import Dataset, Network, NetworkEdge, NetworkNode from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission @@ -21,7 +21,7 @@ class GCCQueryParamSerializer(serializers.Serializer): exclude_nodes = serializers.RegexField(r'^\d+(,\s?\d+)*$') -class DatasetViewSet(ModelViewSet): +class DatasetViewSet(ReadOnlyModelViewSet): queryset = Dataset.objects.all() serializer_class = DatasetSerializer permission_classes = [GuardianPermission]