added acl checks on dashboard update

This commit is contained in:
alejandro-campos 2020-09-16 10:00:05 +02:00
parent 3a95c3dd58
commit 5bb50acfb1
2 changed files with 43 additions and 18 deletions

View File

@ -907,6 +907,11 @@ class Manager
{
global $config;
if (check_acl($config['id_user'], 0, 'RW') === 0) {
include 'general/noaccess.php';
return;
}
$name = \get_parameter('name', '');
$private = \get_parameter_switch('private');
$id_group = \get_parameter('id_group');

View File

@ -194,25 +194,45 @@ if ($config['public_dashboard'] === true) {
// 'slides' => $slides,
];
} else if ($config['pure']) {
$buttons = [
'back_to_dashboard_list' => $back_to_dashboard_list,
'save_layout' => $save_layout_dashboard,
'normalscreen' => $normalscreen,
'combo_refresh_one_dashboard' => $comboRefresh,
'slides' => $slides,
'options' => $options,
];
if (check_acl($config['id_user'], 0, 'RW') === 0) {
$buttons = [
'back_to_dashboard_list' => $back_to_dashboard_list,
'normalscreen' => $normalscreen,
'combo_refresh_one_dashboard' => $comboRefresh,
'slides' => $slides,
];
} else {
$buttons = [
'back_to_dashboard_list' => $back_to_dashboard_list,
'save_layout' => $save_layout_dashboard,
'normalscreen' => $normalscreen,
'combo_refresh_one_dashboard' => $comboRefresh,
'slides' => $slides,
'options' => $options,
];
}
} else {
$buttons = [
'enable_disable' => $enable_disable,
'back_to_dashboard_list' => $back_to_dashboard_list,
'fullscreen' => $fullscreen,
'slides' => $slides,
'public_link' => $publiclink,
'combo_dashboard' => $combo_dashboard,
'options' => $options,
'newWidget' => $newWidget,
];
if (check_acl($config['id_user'], 0, 'RW') === 0) {
$buttons = [
'back_to_dashboard_list' => $back_to_dashboard_list,
'fullscreen' => $fullscreen,
'slides' => $slides,
'public_link' => $publiclink,
'combo_dashboard' => $combo_dashboard,
'newWidget' => $newWidget,
];
} else {
$buttons = [
'enable_disable' => $enable_disable,
'back_to_dashboard_list' => $back_to_dashboard_list,
'fullscreen' => $fullscreen,
'slides' => $slides,
'public_link' => $publiclink,
'combo_dashboard' => $combo_dashboard,
'options' => $options,
'newWidget' => $newWidget,
];
}
}
ui_print_page_header(