brainloper-ui 14.0.41 → 14.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1566,12 +1566,14 @@ class DataTableComponent {
1566
1566
  }
1567
1567
  }
1568
1568
  validateRolAndPermission() {
1569
+ console.log('rol', this.roleId, 'rolesAndPermissions', rolesAndPermissions);
1569
1570
  if (this.roleId != 0) {
1570
1571
  let rolePermissions = rolesAndPermissions?.find(x => x.id == this.roleId);
1571
1572
  this.hasAccessToAll = rolePermissions?.hasAccessToAll ?? rolePermissions.modules?.find(x => x.id == this.moduleId)?.hasAccessToAll ?? false;
1572
1573
  }
1573
1574
  ;
1574
1575
  this.rolesAndPermissionUser = rolesAndPermissions?.find(x => x.id == this.roleId)?.modules?.find(x => x.id == this.moduleId)?.subModules?.find(x => x.id == this.subModuleId)?.permissions ?? {};
1576
+ console.log('rolesAndPermissionsbyUser', this.rolesAndPermissionUser);
1575
1577
  if (!this.hasAccessToAll && !this.rolesAndPermissionUser.readAll && this.rolesAndPermissionUser.readOwn == true) {
1576
1578
  this.params = [...this.params, { id: 'readOwn', value: true }];
1577
1579
  }
@@ -1699,6 +1701,8 @@ class DataTableComponent {
1699
1701
  ];
1700
1702
  }
1701
1703
  hasPermission(permission) {
1704
+ if (permission == 'addComment')
1705
+ console.log('rolesAndPermissionUserinhaspermission', this.rolesAndPermissionUser);
1702
1706
  if (this.hasAccessToAll)
1703
1707
  return true;
1704
1708
  return this.rolesAndPermissionUser?.[permission] ?? false;