mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
@@ -22,14 +22,15 @@ 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(['/']);
|
||||
// if user not active or no session
|
||||
if(!SessionStore.user.Inactivity || !SessionStore.exist) {
|
||||
|
||||
if(SessionStore.user.LoginPreference == 'Pin') {
|
||||
this.router.navigate(['/pin']);
|
||||
} else {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
return false
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user