fix(auth): reject main route if logged out (#4197)

pull/4199/head
Chaim Lev-Ari 4 years ago committed by GitHub
parent 9d18d47194
commit b4c2e5d235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,7 @@ angular.module('portainer.app', ['portainer.oauth']).config([
await StateManager.initialize();
if (!loggedIn) {
$state.go('portainer.auth');
return Promise.reject('Unauthenticated');
}
} catch (err) {
Notifications.error('Failure', err, 'Unable to retrieve application settings');

@ -31,7 +31,7 @@ angular.module('portainer.app').factory('Authentication', [
}
return !!jwt;
} catch (error) {
throw error;
return false;
}
}

Loading…
Cancel
Save