Unverified Commit 0a9f3e3d authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Don't start a session for wiki api logins

parent 49e800e6
from django.conf import settings
from django.contrib.auth import authenticate, login
from django.contrib.auth import authenticate
from django.http import (HttpResponseBadRequest,
HttpResponseForbidden, JsonResponse)
from django.utils import timezone
......@@ -25,7 +25,6 @@ def wiki_login(request):
user = authenticate(username=user, password=password)
if user is not None:
login(request, user)
try:
memberships = [cmm.committee.wiki_namespace for cmm in
user.member.committeemembership_set.exclude(
......@@ -36,6 +35,8 @@ def wiki_login(request):
memberships = []
return JsonResponse({'status': 'ok',
'name': user.get_full_name(),
'mail': user.email,
'admin': user.is_superuser,
'msg': 'Logged in',
'committees': memberships})
......
Supports Markdown
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