From 0872525da100f13ce8e748766f2d1fa26a7a22b4 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Tue, 12 Nov 2024 11:25:22 -0500 Subject: [PATCH] Use RDMAdministrator permission class --- arches_lingo/views/api/pythonic_models.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arches_lingo/views/api/pythonic_models.py b/arches_lingo/views/api/pythonic_models.py index 8daaff24..14e4f3bf 100644 --- a/arches_lingo/views/api/pythonic_models.py +++ b/arches_lingo/views/api/pythonic_models.py @@ -1,6 +1,6 @@ -from rest_framework.permissions import IsAuthenticated from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView +from arches.app.permissions.rest_framework import RDMAdministrator from arches.app.views.api.mixins import ArchesModelAPIMixin from arches_lingo.serializers import ( @@ -12,40 +12,40 @@ class SchemeListCreateView(ArchesModelAPIMixin, ListCreateAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = SchemeSerializer class SchemeDetailView(ArchesModelAPIMixin, RetrieveUpdateDestroyAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = SchemeSerializer class SchemeStatementListCreateView(ArchesModelAPIMixin, ListCreateAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = SchemeStatementSerializer class SchemeStatementDetailView(ArchesModelAPIMixin, RetrieveUpdateDestroyAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = SchemeStatementSerializer class ConceptListCreateView(ArchesModelAPIMixin, ListCreateAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = ConceptSerializer class ConceptDetailView(ArchesModelAPIMixin, RetrieveUpdateDestroyAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = ConceptSerializer class ConceptStatementListCreateView(ArchesModelAPIMixin, ListCreateAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = ConceptStatementSerializer class ConceptStatementDetailView(ArchesModelAPIMixin, RetrieveUpdateDestroyAPIView): - permission_classes = [IsAuthenticated] + permission_classes = [RDMAdministrator] serializer_class = ConceptStatementSerializer