Normal login now pull the service off the session, if it doesn't exist already.
authordeyk <deyk@crossway.org>
Wed, 11 Apr 2012 20:32:56 +0000 (13:32 -0700)
committerdeyk <deyk@crossway.org>
Wed, 11 Apr 2012 20:32:56 +0000 (13:32 -0700)
cas_provider/views.py

index 5ed1c57..5f457bd 100644 (file)
@@ -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 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)
             if service is None:
                 # Normal internal success redirection.
                 logging.debug('Redirecting to %s', success_redirect)