Fix bug where non-instructors couldn't email iCal

This commit is contained in:
Tanner Collin 2022-05-11 00:25:17 +00:00
parent 0911c9a7e5
commit edcc8d2ce0

View File

@ -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