Warning message on service authentication

This commit is contained in:
Valentin Samir 2015-05-16 23:54:40 +02:00
parent 711928d455
commit db65c3c50f

View file

@ -88,6 +88,10 @@ def login(request):
if gateway:
list(messages.get_messages(request)) # clean messages before leaving the django app
return redirect(service)
if request.session.get("authenticated") and renew:
messages.add_message(request, messages.WARNING, u"Demande de réautentification par le service %s." % service)
else:
messages.add_message(request, messages.WARNING, u"Demande d'autentification par le service %s." % service)
return render(request, settings.CAS_LOGIN_TEMPLATE, {'form':form})
def logout(request):