mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Store the preAuthUrl on rootScope instead of in the cookie
This commit is contained in:
parent
cfc15dab37
commit
555c1dcb88
@ -365,7 +365,7 @@ var tower = angular.module('Tower', [
|
||||
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
||||
// User not authenticated, redirect to login page
|
||||
if (!/^\/(login|logout)/.test($location.path())) {
|
||||
$cookies.put('preAuthUrl', $location.path());
|
||||
$rootScope.preAuthUrl = $location.path();
|
||||
}
|
||||
$location.path('/login');
|
||||
} else {
|
||||
|
||||
@ -88,7 +88,7 @@ export default ['$log', '$cookies', '$compile', '$rootScope',
|
||||
}
|
||||
};
|
||||
|
||||
preAuthUrl = $cookies.get('preAuthUrl');
|
||||
preAuthUrl = $rootScope.preAuthUrl;
|
||||
|
||||
$log.debug('User session expired: ' + sessionExpired);
|
||||
$log.debug('Last URL: ' + lastPath());
|
||||
@ -116,7 +116,7 @@ export default ['$log', '$cookies', '$compile', '$rootScope',
|
||||
Wait("stop");
|
||||
if(!Empty(preAuthUrl)){
|
||||
$location.path(preAuthUrl);
|
||||
$cookies.remove('preAuthUrl');
|
||||
delete $rootScope.preAuthUrl;
|
||||
}
|
||||
else {
|
||||
if (lastPath() && lastUser()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user