From 43f0c3ffb5bcf54cd2b62a95b54aa2f3b214c527 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 1 Nov 2024 12:01:32 -0400 Subject: [PATCH] chore(patients): enable authz for individuals API --- chord_metadata_service/patients/api_views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index 7e3caf0f7..66ea09847 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -20,6 +20,7 @@ from rest_framework.settings import api_settings from chord_metadata_service.authz.middleware import authz_middleware +from chord_metadata_service.authz.permissions import BentoPhenopacketDataPermission from chord_metadata_service.authz.types import DataTypeDiscoveryPermissions from chord_metadata_service.chord import data_types as dts from chord_metadata_service.discovery import responses as dres @@ -77,6 +78,7 @@ class IndividualViewSet(viewsets.ModelViewSet): IndividualCSVRenderer, IndividualBentoSearchRenderer, ) + permission_classes = (BentoPhenopacketDataPermission,) filter_backends = [DjangoFilterBackend, filters.OrderingFilter] filterset_class = IndividualFilter ordering_fields = ["id"]