reverting authentication slightly to deal with bug for now

This commit is contained in:
John Mitchell 2015-05-01 15:14:16 -04:00
parent e035e4e98b
commit e00b929866
2 changed files with 1 additions and 11 deletions

View File

@ -105,16 +105,6 @@ export function Authenticate($log, $cookieStore, $compile, $window, $rootScope,
if ($location.path() === '/logout') {
//if logout request, clear AuthToken and user session data
Authorization.logout();
} else if ($location.path() === '/login') {
if ($rootScope.enteredPath) {
$rootScope.lastPath = $rootScope.enteredPath;
} else if (!$rootScope.lastPath) {
// your last path was home
$cookieStore.remove('lastPath');
$rootScope.lastPath = '/home';
}
} else {
$rootScope.enteredPath = $location.path();
}
e = angular.element(document.getElementById('login-modal-content'));

View File

@ -70,7 +70,7 @@ angular.module('AuthService', ['ngCookies', Utilities.name])
$cookieStore.put( 'lastPath', '/portal');
$rootScope.lastPath = '/portal';
}
else if ($cookieStore.get('lastPath') !== '/home' || $cookieStore.get('lastPath') !== '/'){
else if ($cookieStore.get('lastPath') !== '/home' || $cookieStore.get('lastPath') !== '/' || $cookieStore.get('lastPath') !== '/login' || $cookieStore.get('lastPath') !== '/logout'){
// do nothing
$rootScope.lastPath = $cookieStore.get('lastPath');
}