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

View File

@ -2666,6 +2666,7 @@ try {
// Always add options column.
if ((bool) check_acl($config['id_user'], 0, 'EW') === true) {
$fields = array_merge(
$fields,
[
@ -2680,6 +2681,7 @@ try {
],
]
);
}
// 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',
],