Feature: Maybe? Login redirect now supports query string

This commit is contained in:
tanshu 2014-10-03 15:34:49 +05:30
parent d86880396d
commit 91b60fa76d
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ overlord.controller('BaseCtrl', ['$rootScope', '$scope', 'Auth', '$location', '$
} else { } else {
var came_from = $routeParams.came_from; var came_from = $routeParams.came_from;
if (angular.isUndefined(came_from) && $location.path() !== '/login') { if (angular.isUndefined(came_from) && $location.path() !== '/login') {
came_from = $location.path(); came_from = $location.url();
} }
$location.path('/login').search({came_from: came_from}); $location.path('/login').search({came_from: came_from});
} }

View File

@ -28,7 +28,7 @@ def forbidden(request):
response.status_int = 401 response.status_int = 401
return response return response
else: else:
return HTTPFound(location=request.route_url('login', _query={'came_from': request.path})) return HTTPFound(location=request.route_url('login', _query={'came_from': request.path_qs}))
@view_config(route_name='favicon') @view_config(route_name='favicon')