mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
Only store the preAuthUrl if the user is trying to navigate to a non-login/logout state
This commit is contained in:
@@ -364,7 +364,9 @@ var tower = angular.module('Tower', [
|
|||||||
|
|
||||||
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
||||||
// User not authenticated, redirect to login page
|
// User not authenticated, redirect to login page
|
||||||
$cookies.put('preAuthUrl', $location.path());
|
if (!/^\/(login|logout)/.test($location.path())) {
|
||||||
|
$cookies.put('preAuthUrl', $location.path());
|
||||||
|
}
|
||||||
$location.path('/login');
|
$location.path('/login');
|
||||||
} else {
|
} else {
|
||||||
var lastUser = $cookies.getObject('current_user'),
|
var lastUser = $cookies.getObject('current_user'),
|
||||||
|
|||||||
Reference in New Issue
Block a user