From 98e12dd15ea337e22a2e36374669cff80c464bdb Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Thu, 28 Nov 2024 17:12:38 +0800 Subject: [PATCH] Allow staff to view unrestricted document requests endpoint --- docmanager_backend/document_requests/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docmanager_backend/document_requests/views.py b/docmanager_backend/document_requests/views.py index 4272030..b604dbd 100644 --- a/docmanager_backend/document_requests/views.py +++ b/docmanager_backend/document_requests/views.py @@ -1,7 +1,7 @@ from rest_framework import generics from rest_framework.permissions import IsAuthenticated from rest_framework.pagination import PageNumberPagination -from accounts.permissions import IsHead +from accounts.permissions import IsHead, IsStaff from rest_framework.pagination import PageNumberPagination from .serializers import ( DocumentRequestCreationSerializer, @@ -45,13 +45,13 @@ class DocumentRequestListView(generics.ListAPIView): class DocumentRequestFullListView(generics.ListAPIView): """ Returns document requests. Always returns the link to download the document. - Head is able to view all document requests here. Staff and clients have no access + Head is able to view all document requests here. Clients have no access, only staff. """ http_method_names = ["get"] serializer_class = DocumentRequestSerializer pagination_class = PageNumberPagination - permission_classes = [IsAuthenticated, IsHead] + permission_classes = [IsAuthenticated, IsStaff] queryset = DocumentRequest.objects.all()