diff --git a/src/app/OtherService/permission.service.ts b/src/app/OtherService/permission.service.ts index 0b983736a..760951a1b 100644 --- a/src/app/OtherService/permission.service.ts +++ b/src/app/OtherService/permission.service.ts @@ -13,21 +13,26 @@ export class PermissionService { userRole(args) { let data: string[] = [] - if(!Array.isArray(args) && typeof(args) == 'string') { + if(!Array.isArray(args) && typeof(args) == 'string') { data = [args] + } else { + data = args } + console.log('==!!==',data, this.userStore.user.Profile) return data.includes(this.userStore.user.Profile) } role(args: any) { + let UserRoleIsValid = this.userRole(args) return { permissionAnyOf(role) { - if(!Array.isArray(role) && typeof(role) == 'string') { - role = [role] + + if(!Array.isArray(args) && typeof(args) == 'string') { + role = [args] } if(!UserRoleIsValid) {return false } diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index ca17c7c36..bd3cfa790 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -90,7 +90,7 @@
{{ despachoprstore.count }} Documentos
-