mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 06:44:21 +00:00
🐛 Fix notebooks in private projects not being returned for the group owner
This commit is contained in:
parent
8b08e08282
commit
6f3e2fc9e9
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__visibility="PUBLIC") |
|
||||
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(
|
||||
Q(project__visibility="PUBLIC") |
|
||||
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