From 8d071b4938651e05a95a11a843d2a2d5d1628d6b Mon Sep 17 00:00:00 2001 From: svarona Date: Wed, 27 Sep 2023 12:26:02 +0200 Subject: [PATCH] Addded authentication for put function --- drylab/api/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drylab/api/views.py b/drylab/api/views.py index 5a59f923d..5ffb6a051 100644 --- a/drylab/api/views.py +++ b/drylab/api/views.py @@ -258,7 +258,9 @@ def service_full_data(request): @swagger_auto_schema( method="put", manual_parameters=[resolution_number_param, resolution_state_param] ) +@authentication_classes([SessionAuthentication, BasicAuthentication]) @api_view(["PUT"]) +@permission_classes([IsAuthenticated]) def update_state(request): def all_resolutions_delivered(service, state): if (