From: deyk Date: Wed, 11 Apr 2012 20:32:56 +0000 (-0700) Subject: Normal login now pull the service off the session, if it doesn't exist already. X-Git-Tag: 22.4~37 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/2f16449ef5f7c06f5c1e82fdf4c64ac3be8143dc?ds=inline;hp=53c2758ebc9b3166d51e86a128729470fc1d18be Normal login now pull the service off the session, if it doesn't exist already. --- 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)