webpack/ForemanTasks/Components/TasksTable/formatters/actionCellFormatter.js in foreman-tasks-2.0.1 vs webpack/ForemanTasks/Components/TasksTable/formatters/actionCellFormatter.js in foreman-tasks-2.0.2

- old
+ new

@@ -2,15 +2,18 @@ import { cellFormatter } from 'foremanReact/components/common/table'; import { ActionButton } from '../../common/ActionButtons/ActionButton'; export const actionCellFormatter = taskActions => ( value, - { rowData: { action, id } } + { rowData: { action, id, canEdit } } ) => cellFormatter( - <ActionButton - id={id} - name={action} - taskActions={taskActions} - availableActions={value} - /> + canEdit && ( + <ActionButton + canEdit={canEdit} + id={id} + name={action} + taskActions={taskActions} + availableActions={value} + /> + ) );