Commit e1c70fa1 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Change course permission for all users

parent 485a5611
......@@ -63,11 +63,12 @@ class CourseViewSet(viewsets.ModelViewSet):
).prefetch_related('professors')
# Course must have status status published and (be public or share groups with user)
query = Q(
Q(status='published') & (
Q(is_public=True, ) | Q(groups__in=self.request.user.groups.all(), status='published')
)
)
#query = Q(
# Q(status='published') & (
# Q(is_public=True, ) | Q(groups__in=self.request.user.groups.all(), status='published')
# )
#)
query = Q(status='published')
if (CourseProfessor.objects.filter(user=self.request.user, role='coordinator').exists()):
query.add(Q(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment