diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 40d9b1e419..b1933e4198 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -870,11 +870,17 @@ var tower = angular.module('Tower', [ if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) { // User not authenticated, redirect to login page - $rootScope.sessionExpired = false; - $cookieStore.put('sessionExpired', false); - $rootScope.configReady = true; $location.path('/login'); } else { + var lastUser = $cookieStore.get('current_user'), + timestammp = Store('sessionTime'); + if(lastUser && lastUser.id && timestammp && timestammp[lastUser.id]){ + var stime = timestammp[lastUser.id].time, + now = new Date().getTime(); + if ((stime - now) <= 0) { + $location.path('/login'); + } + } // If browser refresh, set the user_is_superuser value $rootScope.user_is_superuser = Authorization.getUserInfo('is_superuser'); // state the user refreshes we want to open the socket, except if the user is on the login page, which should happen after the user logs in (see the AuthService module for that call to OpenSocket) diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html index 94018460b8..8b9ef46bc7 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html +++ b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html @@ -1,4 +1,4 @@ -