From 7eba0306d84adb35af9d1ad2568f11f0cdd2f7a7 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 23 Apr 2011 08:46:02 -0500 Subject: [PATCH] Provide a next= url when we require logging in --- mediagoblin/decorators.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mediagoblin/decorators.py b/mediagoblin/decorators.py index c6b4b545..81b88c9d 100644 --- a/mediagoblin/decorators.py +++ b/mediagoblin/decorators.py @@ -37,7 +37,9 @@ def require_active_login(controller): # TODO: Indicate to the user that they were redirected # here because an *active* user is required. return exc.HTTPFound( - location=request.urlgen("mediagoblin.auth.login")) + location="%s?next=%s" % ( + request.urlgen("mediagoblin.auth.login"), + request.path_info)) return controller(request, *args, **kwargs) -- 2.25.1