mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -36,17 +36,17 @@ export class AuthGuard implements CanActivate {
|
||||
this.authService.loginChat();
|
||||
}
|
||||
|
||||
const pathname = window.location.pathname
|
||||
const pathname = state.url
|
||||
|
||||
if(this.p.userPermission(pathname.startsWith('/home/agenda'))) {
|
||||
if(pathname.startsWith('/home/agenda')) {
|
||||
|
||||
if(this.p.permissionList.Agenda.access) {
|
||||
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)) {
|
||||
@@ -71,14 +71,15 @@ export class AuthGuard implements CanActivate {
|
||||
return false
|
||||
}
|
||||
} else if (pathname.startsWith('/home/events')) {
|
||||
if((SessionStore.user.OwnerCalendars.length != 0 || this.p.userPermission([this.p.permissionList.Gabinete.access]))) {
|
||||
if(SessionStore.user.OwnerCalendars.length >= 1 || this.p.userPermission([this.p.permissionList.Gabinete.access])) {
|
||||
return true
|
||||
} else {
|
||||
this.router.navigate(['/login']);
|
||||
return false
|
||||
}
|
||||
} else if (pathname == '/') {
|
||||
return true
|
||||
this.router.navigate(['/login']);
|
||||
return false
|
||||
} else {
|
||||
this.router.navigate(['/login']);
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user