#1393 remove old redirect code (#1394)

This commit is contained in:
Mario Romano
2017-01-04 22:29:01 +00:00
committed by Denys Vuika
parent a35c2f7c04
commit f89fe8e50a
2 changed files with 3 additions and 3 deletions

View File

@@ -64,12 +64,12 @@ export class AppComponent {
}
redirectToLoginPageIfNotLoggedIn(): void {
if (!this.isLoginPage() && !this.authService.isLoggedIn()) {
if (!this.authService.isLoggedIn()) {
this.router.navigate(['/login']);
}
}
isLoginPage(): boolean {
isAPageWithHeaderBar(): boolean {
return location.pathname === '/login' || location.pathname === '/settings';
}