From edcc8d2ce0d8907183676aa57efbd06eec01760f Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 11 May 2022 00:25:17 +0000 Subject: [PATCH] Fix bug where non-instructors couldn't email iCal --- apiserver/apiserver/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiserver/apiserver/api/views.py b/apiserver/apiserver/api/views.py index 3f3d11e..a3c3fcf 100644 --- a/apiserver/apiserver/api/views.py +++ b/apiserver/apiserver/api/views.py @@ -334,7 +334,7 @@ class SessionViewSet(Base, List, Retrieve, Create, Update): return response - @action(detail=True, methods=['post']) + @action(detail=True, methods=['post'], permission_classes=[IsAuthenticated]) def email_ical(self, request, pk=None): session = get_object_or_404(models.Session, id=pk) user = self.request.user