mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-13287-botones-columnas-sobrantes-en-eventos-para-usuario-sin-permisos' into 'develop'
Ent 13287 botones columnas sobrantes en eventos para usuario sin permisos See merge request artica/pandorafms!7261
This commit is contained in:
commit
e2fc9e27bf
@ -1119,11 +1119,13 @@ function events_get_all(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$ER_groups = users_get_groups($config['id_user'], 'ER', true);
|
|
||||||
$EM_groups = users_get_groups($config['id_user'], 'EM', true, true);
|
$EM_groups = users_get_groups($config['id_user'], 'EM', true, true);
|
||||||
$EW_groups = users_get_groups($config['id_user'], 'EW', true, true);
|
$EW_groups = users_get_groups($config['id_user'], 'EW', true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
||||||
|
$ER_groups = users_get_groups($config['id_user'], 'ER', true);
|
||||||
// Get groups where user have ER grants.
|
// Get groups where user have ER grants.
|
||||||
if ((bool) $filter['search_secondary_groups'] === true) {
|
if ((bool) $filter['search_secondary_groups'] === true) {
|
||||||
$sql_filters[] = sprintf(
|
$sql_filters[] = sprintf(
|
||||||
@ -1690,7 +1692,7 @@ function events_get_all(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$exists_id_grupo = false;
|
$exists_id_grupo = false;
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if (str_contains($field, 'te.id_grupo') === true || str_contains($field, 'te.*') === true) {
|
if (str_contains($field, 'te.id_grupo') === true || str_contains($field, 'te.*') === true) {
|
||||||
@ -1814,7 +1816,7 @@ function events_get_all(
|
|||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$user_is_admin && users_can_manage_group_all('ER') === false) {
|
if (!$user_is_admin && users_can_manage_group_all('EM') === false) {
|
||||||
$can_manage = '0 as user_can_manage';
|
$can_manage = '0 as user_can_manage';
|
||||||
if (empty($EM_groups) === false) {
|
if (empty($EM_groups) === false) {
|
||||||
$can_manage = sprintf(
|
$can_manage = sprintf(
|
||||||
|
@ -2645,20 +2645,22 @@ try {
|
|||||||
|
|
||||||
|
|
||||||
// Always add options column.
|
// Always add options column.
|
||||||
$fields = array_merge(
|
if ((bool) check_acl($config['id_user'], 0, 'EW') === true) {
|
||||||
$fields,
|
$fields = array_merge(
|
||||||
[
|
$fields,
|
||||||
[
|
[
|
||||||
'text' => 'options',
|
[
|
||||||
'class' => 'table_action_buttons mw100px',
|
'text' => 'options',
|
||||||
],
|
'class' => 'table_action_buttons mw100px',
|
||||||
[
|
],
|
||||||
'text' => 'm',
|
[
|
||||||
'extra' => $checkbox_all,
|
'text' => 'm',
|
||||||
'class' => 'w20px no-text-imp',
|
'extra' => $checkbox_all,
|
||||||
],
|
'class' => 'w20px no-text-imp',
|
||||||
]
|
],
|
||||||
);
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Get column names.
|
// Get column names.
|
||||||
$column_names = events_get_column_names($fields, true);
|
$column_names = events_get_column_names($fields, true);
|
||||||
@ -2869,8 +2871,8 @@ try {
|
|||||||
'column_names' => $column_names,
|
'column_names' => $column_names,
|
||||||
'columns' => $fields,
|
'columns' => $fields,
|
||||||
'no_sortable_columns' => [
|
'no_sortable_columns' => [
|
||||||
-1,
|
'options',
|
||||||
-2,
|
'm',
|
||||||
'column-instructions',
|
'column-instructions',
|
||||||
'user_comment',
|
'user_comment',
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user