diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index 922220b46b..0cc90d57c7 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -105,16 +105,6 @@ export function Authenticate($log, $cookieStore, $compile, $window, $rootScope, if ($location.path() === '/logout') { //if logout request, clear AuthToken and user session data Authorization.logout(); - } else if ($location.path() === '/login') { - if ($rootScope.enteredPath) { - $rootScope.lastPath = $rootScope.enteredPath; - } else if (!$rootScope.lastPath) { - // your last path was home - $cookieStore.remove('lastPath'); - $rootScope.lastPath = '/home'; - } - } else { - $rootScope.enteredPath = $location.path(); } e = angular.element(document.getElementById('login-modal-content')); diff --git a/awx/ui/static/js/shared/AuthService.js b/awx/ui/static/js/shared/AuthService.js index aab7f41aea..e447084a72 100644 --- a/awx/ui/static/js/shared/AuthService.js +++ b/awx/ui/static/js/shared/AuthService.js @@ -70,7 +70,7 @@ angular.module('AuthService', ['ngCookies', Utilities.name]) $cookieStore.put( 'lastPath', '/portal'); $rootScope.lastPath = '/portal'; } - else if ($cookieStore.get('lastPath') !== '/home' || $cookieStore.get('lastPath') !== '/'){ + else if ($cookieStore.get('lastPath') !== '/home' || $cookieStore.get('lastPath') !== '/' || $cookieStore.get('lastPath') !== '/login' || $cookieStore.get('lastPath') !== '/logout'){ // do nothing $rootScope.lastPath = $cookieStore.get('lastPath'); }