@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.
@@ -483,9 +483,8 @@ class AddGroupComponent {
483
483
  this.subscription = this.onCancel.subscribe(() => this.resetStepper());
484
484
  this.canCreateGroup =
485
485
  this.subAssetsService.canCreateGroup() ||
486
- (yield this.permissionsService.canEdit([], { id: this.currentGroupId }, {
487
- skipOwnerCheck: true,
488
- skipRolesCheck: true
486
+ (yield this.permissionsService.canEdit(['ROLE_INVENTORY_ADMIN', 'ROLE_INVENTORY_CREATE'], {
487
+ id: this.currentGroupId
489
488
  }));
490
489
  this.canAssignDevice = yield this.subAssetsService.canAssignDevice({
491
490
  id: this.currentGroupId
@@ -1680,10 +1679,7 @@ class SubAssetsComponent {
1680
1679
  this.group = Object.assign({}, contextData);
1681
1680
  this.title = this.group.name;
1682
1681
  this.currentGroupId = this.group.id;
1683
- this.shouldDisableAddGroup = !(yield this.permissionsService.canEdit([], this.group, {
1684
- skipOwnerCheck: true,
1685
- skipRolesCheck: true
1686
- }));
1682
+ this.shouldDisableAddGroup = !(yield this.permissionsService.canEdit(['ROLE_INVENTORY_ADMIN', 'ROLE_INVENTORY_CREATE'], this.group));
1687
1683
  this.shouldDisableAssignDevices = !(yield this.subAssetsService.canAssignDevice(this.group));
1688
1684
  this.customProperties = yield this.subAssetsService.getCustomProperties(this.group);
1689
1685
  this.shouldShowAssetsProperties = this.customProperties.length > 0;