From 75884cde9898cc78ad3b3594806dd1ec56aa076f Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 19 Dec 2022 17:09:25 +0100 Subject: [PATCH] save --- src/app/guards/auth.guard.ts | 4 ---- src/app/guards/login.guard.ts | 2 -- 2 files changed, 6 deletions(-) diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts index e46b20548..f179930b2 100644 --- a/src/app/guards/auth.guard.ts +++ b/src/app/guards/auth.guard.ts @@ -21,17 +21,14 @@ export class AuthGuard implements CanActivate { canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree { - console.log('hire!', state.url) // if user not active if(!SessionStore.user.Inactivity) { - console.log(' goto login /') this.router.navigate(['/']); return false } // if session doesn't exit else if(!SessionStore.exist) { - console.log(' goto /') this.router.navigate(['/']); return false } else { @@ -72,7 +69,6 @@ export class AuthGuard implements CanActivate { } } else if (pathname.startsWith('/home/events')) { if(SessionStore.user.OwnerCalendars.length >= 1 || this.p.userPermission([this.p.permissionList.Gabinete.access])) { - console.log('go /home/events') return true } else { this.router.navigate(['/login']); diff --git a/src/app/guards/login.guard.ts b/src/app/guards/login.guard.ts index fca22ebf0..4d8724808 100644 --- a/src/app/guards/login.guard.ts +++ b/src/app/guards/login.guard.ts @@ -19,10 +19,8 @@ export class LoginGuard implements CanActivate { route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree { - console.log('hire login!', state.url) if(SessionStore.exist && SessionStore.user.Inactivity && SessionStore.user.LoginPreference != 'Pin' ) { - console.log(' goto /home/events') this.router.navigate(['/home/events']); return false } else if(SessionStore.exist && !SessionStore.user.Inactivity && SessionStore.user.LoginPreference == 'Pin' && SessionStore.forceToLoginWithForceToLogInWithPassword && !this.platform.is('desktop') && !this.platform.is('mobileweb')) {