@@ -292,10 +292,13 @@ <h5>
292292 @for (resource of resources.all_resources; track $index) {
293293 < tr >
294294 < td class ="text-center ">
295- < oitc-item-select
296- *oitcPermission ="['scmmodule','resources', 'delete'] "
297- [disabled] ="!resource.allow_edit "
298- [item] ="resource "> </ oitc-item-select >
295+ @if (( PermissionsService.hasModuleObservable('ScmModule')|async ) &&
296+ ( ( PermissionsService.hasPermissionObservable(['ScmModule', 'resources', 'setStatus']) | async ) ||
297+ ( PermissionsService.hasPermissionObservable(['ScmModule', 'resources', 'delete']) | async ) )) {
298+ < oitc-item-select
299+ [disabled] ="!resource.allow_edit "
300+ [item] ="resource "> </ oitc-item-select >
301+ }
299302 </ td >
300303 < td >
301304 @switch (resource.status) {
@@ -408,15 +411,17 @@ <h5>
408411 < fa-icon [icon] ="['fas', 'timeline'] " [rotate] ="90 "> </ fa-icon >
409412 {{ t('Changelog') }}
410413 </ oitc-actions-button-element >
411- < li cDropdownDivider > </ li >
412- < oitc-actions-button-element (click) ="toggleDeleteAllModal(resource) "
413- *ngIf ="resource.allow_edit "
414- [permission] ="'ScmModule.resources.delete' ">
415- < span class ="text-danger ">
416- < fa-icon [icon] ="['fas', 'trash'] "> </ fa-icon >
417- {{ t('Delete') }}
418- </ span >
419- </ oitc-actions-button-element >
414+ @if (( PermissionsService.hasModuleObservable('ScmModule')|async ) && ( PermissionsService.hasPermissionObservable(['ScmModule', 'resources', 'delete']) | async )) {
415+ < li cDropdownDivider > </ li >
416+ < oitc-actions-button-element (click) ="toggleDeleteAllModal(resource) "
417+ *ngIf ="resource.allow_edit "
418+ [permission] ="'ScmModule.resources.delete' ">
419+ < span class ="text-danger ">
420+ < fa-icon [icon] ="['fas', 'trash'] "> </ fa-icon >
421+ {{ t('Delete') }}
422+ </ span >
423+ </ oitc-actions-button-element >
424+ }
420425 </ oitc-actions-button >
421426 </ td >
422427 </ tr >
@@ -436,18 +441,22 @@ <h5>
436441 </ c-col >
437442 < c-col [sm] ="8 " [md] ="5 " [lg] ="4 " [xs] ="3 ">
438443 < div class ="btn-group d-flex flex-row " role ="group ">
439- < button (click) ="toggleSetStatusModal() "
440- class ="btn btn-outline-info col-3 border-0 "
441- type ="button ">
442- < fa-icon [icon] ="['fas', 'person-chalkboard'] "> </ fa-icon >
443- {{ t('Set status for selected') }}
444- </ button >
445- < button (click) ="toggleDeleteAllModal() "
446- class ="btn btn-outline-danger col-3 border-0 "
447- type ="button ">
448- < fa-icon [icon] ="['fas', 'trash'] "> </ fa-icon >
449- {{ t('Delete selected') }}
450- </ button >
444+ @if (( PermissionsService.hasModuleObservable('ScmModule')|async ) && ( PermissionsService.hasPermissionObservable(['ScmModule', 'resources', 'setStatus']) | async )) {
445+ < button (click) ="toggleSetStatusModal() "
446+ class ="btn btn-outline-info col-3 border-0 "
447+ type ="button ">
448+ < fa-icon [icon] ="['fas', 'person-chalkboard'] "> </ fa-icon >
449+ {{ t('Set status for selected') }}
450+ </ button >
451+ }
452+ @if (( PermissionsService.hasModuleObservable('ScmModule')|async ) && ( PermissionsService.hasPermissionObservable(['ScmModule', 'resources', 'delete']) | async )) {
453+ < button (click) ="toggleDeleteAllModal() "
454+ class ="btn btn-outline-danger col-3 border-0 "
455+ type ="button ">
456+ < fa-icon [icon] ="['fas', 'trash'] "> </ fa-icon >
457+ {{ t('Delete selected') }}
458+ </ button >
459+ }
451460 </ div >
452461 </ c-col >
453462 </ c-row >
0 commit comments