mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-27 02:11:48 -05:00
Adding an extra session check for when a user closes tower
before the session times out and returns to Tower. Also changed the login route controller to a resolve to ensure that the login modal appears.
This commit is contained in:
@@ -61,10 +61,8 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope',
|
||||
function ($log, $cookieStore, $compile, $window, $rootScope, $location,
|
||||
Authorization, ToggleClass, Alert, Wait, Timer, Empty, ClearScope,
|
||||
scope, pendoService, ConfigService, CheckLicense, FeaturesService) {
|
||||
|
||||
var lastPath, lastUser, sessionExpired, loginAgain;
|
||||
|
||||
$rootScope.configReady = true;
|
||||
loginAgain = function() {
|
||||
setTimeout(function() {
|
||||
$location.path('/logout');
|
||||
@@ -75,6 +73,7 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope',
|
||||
scope.login_username = '';
|
||||
scope.login_password = '';
|
||||
|
||||
|
||||
lastPath = function () {
|
||||
return (Empty($rootScope.lastPath)) ? $cookieStore.get('lastPath') : $rootScope.lastPath;
|
||||
};
|
||||
@@ -104,12 +103,6 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope',
|
||||
scope.customLoginInfoPresent = (scope.customLoginInfo) ? true : false;
|
||||
});
|
||||
|
||||
// Reset the login form
|
||||
//scope.loginForm.login_username.$setPristine();
|
||||
//scope.loginForm.login_password.$setPristine();
|
||||
//$rootScope.userLoggedIn = false; //hide the logout link. if you got here, you're logged out.
|
||||
//$cookieStore.put('userLoggedIn', false); //gets set back to true by Authorization.setToken().
|
||||
|
||||
if (scope.removeAuthorizationGetLicense) {
|
||||
scope.removeAuthorizationGetLicense();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user