summaryrefslogtreecommitdiffstats
path: root/hyperkitty/views/index.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-12-04 10:51:20 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-12-04 10:51:20 +0100
commitb3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2 (patch)
treeb2461e717a2ea893cbf59a20a5ef5b04ae1b2f90 /hyperkitty/views/index.py
parent0bd5582a75d5a610885241ba52186033e2272424 (diff)
downloadhyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.tar.gz
hyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.tar.xz
hyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.zip
Add a config option to only display lists from the same virtual host
Diffstat (limited to 'hyperkitty/views/index.py')
-rw-r--r--hyperkitty/views/index.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/hyperkitty/views/index.py b/hyperkitty/views/index.py
index cb3c6b1..55ffa30 100644
--- a/hyperkitty/views/index.py
+++ b/hyperkitty/views/index.py
@@ -34,13 +34,15 @@ from mailmanclient import Client, MailmanConnectionError
from mailman.interfaces.archiver import ArchivePolicy
from hyperkitty.lib import get_store
+from hyperkitty.lib.view_helpers import show_mlist
from hyperkitty.lib.mailman import is_mlist_authorized
def index(request):
- store = get_store(request)
- lists = store.get_lists()
now = datetime.datetime.now()
+ store = get_store(request)
+ lists = [ l for l in store.get_lists()
+ if not settings.FILTER_VHOST or show_mlist(l, request) ]
initials = set()
for mlist in lists:
if mlist.archive_policy != ArchivePolicy.private: