Skip to content

Commit 195588c

Browse files
committed
Fixes #336
1 parent f7d1c42 commit 195588c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dojo/filters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,14 @@ def __init__(self, *args, **kwargs):
753753
self.form.fields['test__engagement__product'].queryset = Product.objects.filter(
754754
authorized_users__in=[self.user])
755755

756+
@property
757+
def qs(self):
758+
parent = super(ReportAuthedFindingFilter, self).qs
759+
if self.user.is_staff:
760+
return parent
761+
else:
762+
return parent.filter(test__engagement__product__authorized_users__in=[self.user])
763+
756764
class Meta:
757765
model = Finding
758766
exclude = ['date', 'cwe', 'url', 'description', 'mitigation', 'impact',

0 commit comments

Comments
 (0)