From 2f16449ef5f7c06f5c1e82fdf4c64ac3be8143dc Mon Sep 17 00:00:00 2001 From: deyk Date: Wed, 11 Apr 2012 13:32:56 -0700 Subject: [PATCH] Normal login now pull the service off the session, if it doesn't exist already. --- cas_provider/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cas_provider/views.py b/cas_provider/views.py index 5ed1c57..5f457bd 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -93,6 +93,10 @@ def login(request, template_name='cas/login.html', success_redirect='/account/', if not user.is_active: errors.append('This account is disabled.') else: + if service is None: + # Try and pull the service off the session + service = request.session.pop('service', service) + if service is None: # Normal internal success redirection. logging.debug('Redirecting to %s', success_redirect) -- 2.20.1