From 50534c898fb350b4ed053bf2bd875d44129f3b78 Mon Sep 17 00:00:00 2001 From: Bram Meir Date: Tue, 16 Apr 2024 17:36:12 +0200 Subject: [PATCH] fix: backend permission --- backend/api/permissions/teacher_permissions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/api/permissions/teacher_permissions.py b/backend/api/permissions/teacher_permissions.py index fd0969cd..bd855e08 100644 --- a/backend/api/permissions/teacher_permissions.py +++ b/backend/api/permissions/teacher_permissions.py @@ -9,8 +9,7 @@ class TeacherPermission(IsAuthenticated): def has_permission(self, request, view): """Check if user has permission to view a general Teacher endpoint.""" user = request.user - - if view.action in ['list', 'retrieve', 'search']: + if view.action in ['list', 'retrieve', 'search', 'projects']: # Every teacher can get the list of teachers return user.is_authenticated and is_teacher(user)