This commit is contained in:
Peter Maquiran
2022-02-07 15:51:21 +01:00
parent fe2bd52be3
commit 2caaad7f2b
7 changed files with 20 additions and 22 deletions
+2
View File
@@ -17,10 +17,12 @@ export class AuthGuard implements CanActivate {
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
// if user not active
if(!SessionStore.user.Inactivity) {
this.router.navigate(['/']);
return false
}
// if session doesn't exit
else if(!SessionStore.exist) {
this.router.navigate(['/']);
return false