mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 03:31:10 -03: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()) {
|
||||
// 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'),
|
||||
|
||||
Reference in New Issue
Block a user