Commit 74fa5d97 authored by Enrico Zini's avatar Enrico Zini
Browse files

Do not log out already logged out users

parent 88ad6946
......@@ -34,7 +34,8 @@ class DACSRemoteUserMiddleware(django.contrib.auth.middleware.RemoteUserMiddlewa
# AuthenticationMiddleware).
# Actually, make really sure we are logged out!
auth.logout(request)
if request.user.is_authenticated():
auth.logout(request)
return
# If the user is already authenticated and that user is the user we are
# getting passed in the headers, then the correct user is already
......
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