mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🐛 Fix notebooks in private projects not being returned for the group owner
This commit is contained in:
parent
015de8a40f
commit
be4df7daa5
1 changed files with 4 additions and 2 deletions
|
@ -67,7 +67,8 @@ class NotebooksByProjectViewSet(NotebooksViewSet):
|
||||||
Q(project__slug=self.kwargs["project_slug"]) & (
|
Q(project__slug=self.kwargs["project_slug"]) & (
|
||||||
Q(project__visibility="PUBLIC") |
|
Q(project__visibility="PUBLIC") |
|
||||||
Q(project__visibility="INTERNAL") |
|
Q(project__visibility="INTERNAL") |
|
||||||
Q(project__visibility="PRIVATE", project__group__members__in=[self.request.user])
|
Q(project__visibility="PRIVATE", project__group__members__in=[self.request.user]) |
|
||||||
|
Q(project__visibility="PRIVATE", project__group__owner=self.request.user)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -94,5 +95,6 @@ class NotebooksBySlugViewSet(NotebooksViewSet):
|
||||||
return Notebook.objects.filter(
|
return Notebook.objects.filter(
|
||||||
Q(project__visibility="PUBLIC") |
|
Q(project__visibility="PUBLIC") |
|
||||||
Q(project__visibility="INTERNAL") |
|
Q(project__visibility="INTERNAL") |
|
||||||
Q(project__visibility="PRIVATE", project__group__members__in=[self.request.user])
|
Q(project__visibility="PRIVATE", project__group__members__in=[self.request.user]) |
|
||||||
|
Q(project__visibility="PRIVATE", project__group__owner=self.request.user)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue