Fix for session limit per user

This commit is contained in:
Jared Tabor 2016-06-01 16:50:32 -07:00
parent 4466fc80a2
commit 4d1c43f4bd
3 changed files with 3 additions and 4 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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);