mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 21:21:21 -03:30
Only store the preAuthUrl if the user is trying to navigate to a non-login/logout state
This commit is contained in:
parent
7768106d3f
commit
cfc15dab37
@ -364,7 +364,9 @@ var tower = angular.module('Tower', [
|
||||
|
||||
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
||||
// 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');
|
||||
} else {
|
||||
var lastUser = $cookies.getObject('current_user'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user