Commit 90c33b48 authored by Michal Čihař's avatar Michal Čihař

Filter changes browsing by ACL

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 18aee693
......@@ -128,6 +128,16 @@ class ChangesView(ListView):
result = Change.objects.prefetch()
# Filter by ACL
acl_projects, filtered = Project.objects.get_acl_status(
self.request.user
)
if filtered:
result = result.filter(
Q(translation__subproject__project__in=acl_projects) |
Q(dictionary__project__in=acl_projects)
)
if self.translation is not None:
result = result.filter(
translation=self.translation
......
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