From c3f3e90af10c53cc9aff1022b2fc58c0ccab0f7c Mon Sep 17 00:00:00 2001 From: David Kreitschmann Date: Wed, 25 Mar 2015 23:59:36 +0100 Subject: [PATCH] Redirect using "next" parameter when using shibboleth button --- seahub/templates/registration/login.html | 2 +- seahub/views/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/seahub/templates/registration/login.html b/seahub/templates/registration/login.html index 55ee0d9aed..d2467cf449 100644 --- a/seahub/templates/registration/login.html +++ b/seahub/templates/registration/login.html @@ -133,7 +133,7 @@ $(function() { {% if enable_shib_login %} $(function() { $('#shib-login').click(function() { - window.location = "{% url 'shib_login' %}"; + window.location = "{% url 'shib_login' %}{% if next %}?next={{ next|escape }}{% endif %}"; return false; }); }); diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py index 8b56d696b9..2dc092c53b 100644 --- a/seahub/views/__init__.py +++ b/seahub/views/__init__.py @@ -2004,4 +2004,4 @@ def image_view(request, filename): return response def shib_login(request): - return HttpResponseRedirect(reverse('myhome')) + return HttpResponseRedirect(request.GET.get("next",reverse('myhome')))