mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
check notification and inactivity
This commit is contained in:
@@ -14,9 +14,6 @@ export class AuthGuard implements CanActivate {
|
||||
constructor(
|
||||
private router:Router,
|
||||
public p: PermissionService,
|
||||
private RouteService: RouteService,
|
||||
private FirstEnterService: FirstEnterService,
|
||||
private alertController: AlertController,
|
||||
){}
|
||||
|
||||
canActivate(
|
||||
@@ -31,7 +28,7 @@ export class AuthGuard implements CanActivate {
|
||||
} else {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
|
||||
return false
|
||||
} else {
|
||||
|
||||
@@ -39,15 +36,15 @@ export class AuthGuard implements CanActivate {
|
||||
|
||||
if(pathname.startsWith('/home/agenda')) {
|
||||
if(this.p.userPermission(this.p.permissionList.Agenda.access)) {
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
this.router.navigate(['/login']);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} else if ( pathname.startsWith('/home/gabinete-digital')) {
|
||||
|
||||
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Gabinete.access)) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user