13287-Remove columns Options and Checkbox in Events for users without EW. Fix no_sorteable_columns in Events

This commit is contained in:
Pablo Aragon 2024-04-23 08:29:08 +02:00
parent 2aff3b5d96
commit 9a4f2aa7c9
1 changed files with 17 additions and 15 deletions

View File

@ -2666,20 +2666,22 @@ try {
// Always add options column.
$fields = array_merge(
$fields,
[
if ((bool) check_acl($config['id_user'], 0, 'EW') === true) {
$fields = array_merge(
$fields,
[
'text' => 'options',
'class' => 'table_action_buttons mw100px',
],
[
'text' => 'm',
'extra' => $checkbox_all,
'class' => 'w20px no-text-imp',
],
]
);
[
'text' => 'options',
'class' => 'table_action_buttons mw100px',
],
[
'text' => 'm',
'extra' => $checkbox_all,
'class' => 'w20px no-text-imp',
],
]
);
}
// Get column names.
$column_names = events_get_column_names($fields, true);
@ -2890,8 +2892,8 @@ try {
'column_names' => $column_names,
'columns' => $fields,
'no_sortable_columns' => [
-1,
-2,
'options',
'm',
'column-instructions',
'user_comment',
],