Commit cf4362b8 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Avoid logout of unauthenticated users

parent de1fe683
......@@ -73,8 +73,9 @@ def login(request):
return HttpResponseForbidden(_(astakos_messages.NOT_ALLOWED_NEXT_PARAM))
force = request.GET.get('force', None)
response = HttpResponse()
if force == '':
if force == '' and request.user.is_authenticated():
logout(request)
if request.user.is_authenticated():
# if user has not signed the approval terms
# redirect to approval terms with next the request path
......
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