From 374736833c5c18bc63e5c9fe726134a621d2a46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Wed, 23 Mar 2022 16:12:10 +0100 Subject: [PATCH] Define `permission_classes` for `FellowshipPublicAPIViewSet` --- scipost_django/colleges/api/viewsets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scipost_django/colleges/api/viewsets.py b/scipost_django/colleges/api/viewsets.py index b524817cd..c7d080c86 100644 --- a/scipost_django/colleges/api/viewsets.py +++ b/scipost_django/colleges/api/viewsets.py @@ -2,6 +2,8 @@ __copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" __license__ = "AGPL v3" +from rest_framework.permissions import AllowAny + from api.viewsets.base import ExtraFilteredReadOnlyModelViewSet from api.viewsets.mixins import FilteringOptionsActionMixin @@ -14,6 +16,9 @@ class FellowshipPublicAPIViewSet( FilteringOptionsActionMixin, ExtraFilteredReadOnlyModelViewSet ): queryset = Fellowship.objects.all() + permission_classes = [ + AllowAny, + ] serializer_class = FellowshipPublicAPISerializer search_fields = [ "first_name", -- GitLab