From 4d1c43f4bd5d03dd19aa00bb512437220a426425 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 1 Jun 2016 16:50:32 -0700 Subject: [PATCH] Fix for session limit per user --- awx/ui/client/src/app.js | 2 +- awx/ui/client/src/bread-crumb/bread-crumb.directive.js | 1 - awx/ui/client/src/rest/interceptors.service.js | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 98db6a9b33..857497c493 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -754,7 +754,7 @@ var tower = angular.module('Tower', [ control_socket.on("limit_reached", function(data) { $log.debug(data.reason); $rootScope.sessionTimer.expireSession('session_limit'); - $location.url('/login'); + $state.go('signOut'); }); } openSocket(); diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js index ee1670ecd9..e96a6e96c7 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js +++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js @@ -40,7 +40,6 @@ export default // attached to the $rootScope. var features = FeaturesService.get(); if(features){ - scope.loadingLicense = false; scope.activityStreamActive = (toState.name === 'activityStream') ? true : false; scope.showActivityStreamButton = (FeaturesService.featureEnabled('activity_streams') || toState.name ==='activityStream') ? true : false; diff --git a/awx/ui/client/src/rest/interceptors.service.js b/awx/ui/client/src/rest/interceptors.service.js index 1fef3584f2..e30b1d5b99 100644 --- a/awx/ui/client/src/rest/interceptors.service.js +++ b/awx/ui/client/src/rest/interceptors.service.js @@ -25,8 +25,8 @@ responseError: function(rejection){ if(rejection && rejection.data && rejection.data.detail && rejection.data.detail === "Maximum per-user sessions reached"){ $rootScope.sessionTimer.expireSession('session_limit'); - var location = $injector.get('$location'); - location.url('/login'); + var state = $injector.get('$state'); + state.go('signOut'); return $q.reject(rejection); } return $q.reject(rejection);