Skip to content

Commit

Permalink
fix: backend permission
Browse files Browse the repository at this point in the history
  • Loading branch information
BramMeir committed Apr 16, 2024
1 parent 46ce291 commit 50534c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/api/permissions/teacher_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 50534c8

Please sign in to comment.