From aa5bb7ef7285ac21d24e9597c1bc181554540ac9 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 7 Jun 2015 16:53:27 +0200 Subject: [PATCH] Use url parameter on logout --- cas_server/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cas_server/views.py b/cas_server/views.py index cec0ae2..550d792 100644 --- a/cas_server/views.py +++ b/cas_server/views.py @@ -84,11 +84,15 @@ class LogoutView(View, LogoutMixin): """methode called on GET request on this view""" self.request = request self.service = request.GET.get('service') + self.url = request.GET.get('url') self.logout() # if service is set, redirect to service after logout if self.service: list(messages.get_messages(request)) # clean messages before leaving the django app return HttpResponseRedirect(self.service) + elif self.url: + list(messages.get_messages(request)) # clean messages before leaving the django app + return HttpResponseRedirect(self.url) # else redirect to login page else: if settings.CAS_REDIRECT_TO_LOGIN_AFTER_LOGOUT: