mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
use isEmpty check for valid object on session limit
This commit is contained in:
@@ -94,8 +94,7 @@ export default
|
|||||||
$rootScope.token_expires = null;
|
$rootScope.token_expires = null;
|
||||||
$rootScope.login_username = null;
|
$rootScope.login_username = null;
|
||||||
$rootScope.login_password = null;
|
$rootScope.login_password = null;
|
||||||
clearTimeout($rootScope.idleTimer);
|
$rootScope.sessionTimer.expireSession();
|
||||||
clearTimeout($rootScope.endTimer);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getLicense: function () {
|
getLicense: function () {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
responseError: function(rejection){
|
responseError: function(rejection){
|
||||||
if(rejection.data.detail && rejection.data.detail === "Maximum per-user sessions reached"){
|
if( !_.isEmpty(rejection.data.detail) && rejection.data.detail === "Maximum per-user sessions reached"){
|
||||||
$rootScope.sessionTimer.expireSession('session_limit');
|
$rootScope.sessionTimer.expireSession('session_limit');
|
||||||
return rejection;
|
return rejection;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user