Commit 7dc77873 authored by Michal Čihař's avatar Michal Čihař

Limit main page listings by ACL (issue #187)

parent d4dbfe7f
......@@ -79,8 +79,9 @@ def home(request):
and user links if logged in.
'''
projects = Project.objects.all()
if projects.count() == 1:
projects = SubProject.objects.all()
projects = [project for project in projects if project.has_acl(request)]
if len(projects) == 1:
projects = SubProject.objects.filter(project=projects[0])
# Warn about not filled in username (usually caused by migration of
# users from older system
......
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