158_PIK #171
@ -60,7 +60,7 @@ class CheckboxCompensationTableFilter(CheckboxTableFilter):
|
|||||||
if not value:
|
if not value:
|
||||||
return queryset.filter(
|
return queryset.filter(
|
||||||
Q(intervention__users__in=[self.user]) | # requesting user has access
|
Q(intervention__users__in=[self.user]) | # requesting user has access
|
||||||
Q(intervention__teams__users__in=[self.user])
|
Q(intervention__teams__in=self.user.shared_teams)
|
||||||
).distinct()
|
).distinct()
|
||||||
else:
|
else:
|
||||||
return queryset
|
return queryset
|
||||||
|
@ -305,7 +305,7 @@ class ShareableTableFilterMixin(django_filters.FilterSet):
|
|||||||
if not value:
|
if not value:
|
||||||
return queryset.filter(
|
return queryset.filter(
|
||||||
Q(users__in=[self.user]) | # requesting user has access
|
Q(users__in=[self.user]) | # requesting user has access
|
||||||
Q(teams__users__in=[self.user])
|
Q(teams__in=self.user.shared_teams)
|
||||||
).distinct()
|
).distinct()
|
||||||
else:
|
else:
|
||||||
return queryset
|
return queryset
|
||||||
|
Loading…
Reference in New Issue
Block a user