From 39b9d28faf50ec340e69e6389a7eba3e6d99f291 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 15 Jul 2019 13:16:06 +0200 Subject: Public API: token authentication --- archaeological_finds/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archaeological_finds/views.py') diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index d5d5d88b6..763733bd9 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -20,6 +20,7 @@ from collections import OrderedDict import json +from rest_framework import authentication, permissions from rest_framework.views import APIView from rest_framework.response import Response @@ -1008,8 +1009,8 @@ class QAFindbasketDuplicateFormView(QAItemForm): class PublicFindAPI(APIView): - # authentication_classes = (authentication.TokenAuthentication,) - # permission_classes = (permissions.IsAdminUser,) + authentication_classes = (authentication.TokenAuthentication,) + permission_classes = (permissions.IsAuthenticated,) def get_queryset(self): empty = models.Find.objects.filter(pk=None) -- cgit v1.2.3