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; global $config;
if (check_acl($config['id_user'], 0, 'RW') === 0) {
include 'general/noaccess.php';
return;
}
$name = \get_parameter('name', ''); $name = \get_parameter('name', '');
$private = \get_parameter_switch('private'); $private = \get_parameter_switch('private');
$id_group = \get_parameter('id_group'); $id_group = \get_parameter('id_group');

View File

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