Verified Commit 7c734bad authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix the wiki login

parent f01d8235
...@@ -45,11 +45,12 @@ def wiki_login(request): ...@@ -45,11 +45,12 @@ def wiki_login(request):
user = authenticate(username=user, password=password) user = authenticate(username=user, password=password)
if user is not None: if user is not None:
memberships = [ memberships = [
cmm.committee.wiki_namespace for cmm in x.group.committee.wiki_namespace for x in
user.membergroupmembership_set user.membergroupmembership_set
.exclude(until__lt=timezone.now().date()) .exclude(until__lt=timezone.now().date())
.select_related('group') .select_related('group')
if cmm.committee.wiki_namespace is not None] if hasattr(x.group, 'committee') and
x.group.committee.wiki_namespace is not None]
if user.has_perm('activemembers.board_wiki'): if user.has_perm('activemembers.board_wiki'):
memberships.append('bestuur') memberships.append('bestuur')
......
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