mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
AC-292 Fixed time-out message on login dialog to only display if user has not already logged out.
This commit is contained in:
@@ -19,13 +19,20 @@ function Authenticate($window, $scope, $rootScope, $location, Authorization, Tog
|
|||||||
Authorization.logout();
|
Authorization.logout();
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootScope.userLoggedIn = false; //hide the logout link. if you got here, your logged out.
|
|
||||||
//gets set back to true by Authorization.setToken().
|
|
||||||
|
|
||||||
$scope.sessionExpired = Authorization.didSessionExpire(); //Display session timeout message
|
|
||||||
$scope.sessionTimeout = ($AnsibleConfig.session_timeout / 60).toFixed(2);
|
$scope.sessionTimeout = ($AnsibleConfig.session_timeout / 60).toFixed(2);
|
||||||
$scope.AWXLoginLogo = $staticURL + 'img/AWX_logo.png';
|
$scope.AWXLoginLogo = $staticURL + 'img/AWX_logo.png';
|
||||||
|
|
||||||
|
if ($rootScope.userLoggedIn) {
|
||||||
|
// If we're logged in, check for session timeout
|
||||||
|
$scope.sessionExpired = Authorization.didSessionExpire();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$scope.sessionExpired = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rootScope.userLoggedIn = false; //hide the logout link. if you got here, your logged out.
|
||||||
|
//gets set back to true by Authorization.setToken().
|
||||||
|
|
||||||
$('#login-password').bind('keypress', function(e) {
|
$('#login-password').bind('keypress', function(e) {
|
||||||
var code = (e.keyCode ? e.keyCode : e.which);
|
var code = (e.keyCode ? e.keyCode : e.which);
|
||||||
if (code == 13) {
|
if (code == 13) {
|
||||||
|
|||||||
Reference in New Issue
Block a user