@c8y/ngx-components 1017.0.262 → 1017.0.263

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.
@@ -467,9 +467,8 @@ class AddGroupComponent {
467
467
  this.subscription = this.onCancel.subscribe(() => this.resetStepper());
468
468
  this.canCreateGroup =
469
469
  this.subAssetsService.canCreateGroup() ||
470
- (await this.permissionsService.canEdit([], { id: this.currentGroupId }, {
471
- skipOwnerCheck: true,
472
- skipRolesCheck: true
470
+ (await this.permissionsService.canEdit(['ROLE_INVENTORY_ADMIN', 'ROLE_INVENTORY_CREATE'], {
471
+ id: this.currentGroupId
473
472
  }));
474
473
  this.canAssignDevice = await this.subAssetsService.canAssignDevice({
475
474
  id: this.currentGroupId
@@ -1608,10 +1607,7 @@ class SubAssetsComponent {
1608
1607
  this.group = { ...contextData };
1609
1608
  this.title = this.group.name;
1610
1609
  this.currentGroupId = this.group.id;
1611
- this.shouldDisableAddGroup = !(await this.permissionsService.canEdit([], this.group, {
1612
- skipOwnerCheck: true,
1613
- skipRolesCheck: true
1614
- }));
1610
+ this.shouldDisableAddGroup = !(await this.permissionsService.canEdit(['ROLE_INVENTORY_ADMIN', 'ROLE_INVENTORY_CREATE'], this.group));
1615
1611
  this.shouldDisableAssignDevices = !(await this.subAssetsService.canAssignDevice(this.group));
1616
1612
  this.customProperties = await this.subAssetsService.getCustomProperties(this.group);
1617
1613
  this.shouldShowAssetsProperties = this.customProperties.length > 0;