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:
Jared Tabor
2016-06-10 08:58:46 -07:00
parent 251dae657a
commit c6879e5163
9 changed files with 54 additions and 41 deletions

View File

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