mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix access to chat and agenda (user has no own calendar)
This commit is contained in:
@@ -46,7 +46,7 @@ export class AuthGuard implements CanActivate {
|
||||
this.router.navigate(['/login']);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} else if ( pathname.startsWith('/home/gabinete-digital')) {
|
||||
|
||||
if(this.p.userPermission(this.p.permissionList.Gabinete.access)) {
|
||||
@@ -57,7 +57,7 @@ export class AuthGuard implements CanActivate {
|
||||
}
|
||||
}
|
||||
else if(pathname.startsWith('/home/chat')) {
|
||||
if(this.p.userPermission(this.p.permissionList.Gabinete.access)) {
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
return true;
|
||||
} else {
|
||||
this.router.navigate(['/login']);
|
||||
@@ -71,7 +71,7 @@ export class AuthGuard implements CanActivate {
|
||||
return false
|
||||
}
|
||||
} else if (pathname.startsWith('/home/events')) {
|
||||
if((this.p.userPermission([this.p.permissionList.Agenda.access]) || this.p.userPermission([this.p.permissionList.Gabinete.access]))) {
|
||||
if((SessionStore.user.OwnerCalendars.length != 0 || this.p.userPermission([this.p.permissionList.Gabinete.access]))) {
|
||||
return true
|
||||
} else {
|
||||
this.router.navigate(['/login']);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<ion-tabs class="tab" >
|
||||
<div *ngIf="this.platform.is('mobile')">
|
||||
<div *ngIf="platform.is('mobile') || platform.is('mobileweb')">
|
||||
|
||||
<ion-tab-bar *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2 || (p.userPermission([permissionList.Agenda.access]) && loggeduser.OwnerCalendars.length != 0) || p.userPermission([permissionList.Gabinete.access])" class="bottoms" slot="bottom">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user