mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
fix console report pandora_enterprise#6367
This commit is contained in:
parent
743b1c295f
commit
d9227fae0e
@ -6106,7 +6106,7 @@ function is_reporting_console_node()
|
|||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function acl_reporting_console_node($path)
|
function acl_reporting_console_node($path, $tab='')
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
if (is_reporting_console_node() === false) {
|
if (is_reporting_console_node() === false) {
|
||||||
@ -6114,17 +6114,49 @@ function acl_reporting_console_node($path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
|
if ($path === 'advanced/metasetup') {
|
||||||
|
switch ($tab) {
|
||||||
|
case 'update_manager_online':
|
||||||
|
case 'update_manager_offline':
|
||||||
|
case 'update_manager_history':
|
||||||
|
case 'update_manager_setup':
|
||||||
|
case 'file_manager':
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($path === 'advanced/users_setup') {
|
||||||
|
switch ($tab) {
|
||||||
|
case 'user_edit':
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($path === $config['homedir'].'/godmode/users/configure_user'
|
if ($path === $config['homedir'].'/godmode/users/configure_user'
|
||||||
|| $path === 'advanced/users_setup'
|
|
||||||
|| $path === 'advanced/metasetup'
|
|
||||||
|| $path === 'advanced/links'
|
|| $path === 'advanced/links'
|
||||||
|| $path === $config['homedir'].'/enterprise/extensions/cron'
|
|| $path === $config['homedir'].'/enterprise/extensions/cron'
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($path === 'godmode/servers/discovery'
|
if ($path === 'godmode/servers/discovery') {
|
||||||
|| $path === 'operation/users/user_edit'
|
switch ($tab) {
|
||||||
|
case 'main':
|
||||||
|
case 'tasklist':
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($path === 'operation/users/user_edit'
|
||||||
|| $path === 'operation/users/user_edit_notifications'
|
|| $path === 'operation/users/user_edit_notifications'
|
||||||
|| $path === 'godmode/setup/file_manager'
|
|| $path === 'godmode/setup/file_manager'
|
||||||
|| $path === 'godmode/update_manager/update_manager'
|
|| $path === 'godmode/update_manager/update_manager'
|
||||||
|
@ -492,7 +492,10 @@ function cron_list_table()
|
|||||||
$table->head[4] = __('Next execution');
|
$table->head[4] = __('Next execution');
|
||||||
$table->head[5] = __('Last run');
|
$table->head[5] = __('Last run');
|
||||||
$table->head[6] = __('Group');
|
$table->head[6] = __('Group');
|
||||||
$table->head[7] = __('Actions');
|
if ($manage_perms || $manage_pandora) {
|
||||||
|
$table->head[7] = __('Actions');
|
||||||
|
}
|
||||||
|
|
||||||
$table->align[7] = 'left';
|
$table->align[7] = 'left';
|
||||||
|
|
||||||
foreach ($defined_tasks as $task) {
|
foreach ($defined_tasks as $task) {
|
||||||
@ -602,7 +605,7 @@ function cron_list_table()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'cron_task_generate_report_by_template':
|
case 'cron_task_generate_report_by_template':
|
||||||
if ((bool) $task['enabled'] === true && ($write_perms === true || $manage_pandora === true)) {
|
if ((bool) $task['enabled'] === true) {
|
||||||
$data[0] = html_print_anchor(
|
$data[0] = html_print_anchor(
|
||||||
[
|
[
|
||||||
'href' => sprintf(
|
'href' => sprintf(
|
||||||
@ -954,25 +957,27 @@ function cron_list_table()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[7] .= html_print_anchor(
|
if ($manage_perms || $manage_pandora) {
|
||||||
[
|
$data[7] .= html_print_anchor(
|
||||||
'href' => sprintf(
|
[
|
||||||
'%stoggle_console_task=%s&id_user_task=%s',
|
'href' => sprintf(
|
||||||
$url,
|
'%stoggle_console_task=%s&id_user_task=%s',
|
||||||
((bool) $task['enabled'] === true) ? '0' : '1',
|
$url,
|
||||||
$task['id']
|
((bool) $task['enabled'] === true) ? '0' : '1',
|
||||||
),
|
$task['id']
|
||||||
'content' => html_print_image(
|
),
|
||||||
((bool) $task['enabled'] === true) ? 'images/lightbulb.png' : 'images/lightbulb_off.png',
|
'content' => html_print_image(
|
||||||
true,
|
((bool) $task['enabled'] === true) ? 'images/lightbulb.png' : 'images/lightbulb_off.png',
|
||||||
[
|
true,
|
||||||
'title' => ((bool) $task['enabled'] === true) ? __('Disable task') : __('Enable task'),
|
[
|
||||||
'class' => 'invert_filter',
|
'title' => ((bool) $task['enabled'] === true) ? __('Disable task') : __('Enable task'),
|
||||||
]
|
'class' => 'invert_filter',
|
||||||
),
|
]
|
||||||
],
|
),
|
||||||
true
|
],
|
||||||
);
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
@ -1240,7 +1240,12 @@ if ($searchPage) {
|
|||||||
$sec2 = '';
|
$sec2 = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$acl_reporting_console_node = acl_reporting_console_node($page);
|
$tab = get_parameter('tab', '');
|
||||||
|
if (empty($tab) === true) {
|
||||||
|
$tab = get_parameter('wiz', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$acl_reporting_console_node = acl_reporting_console_node($page, $tab);
|
||||||
if ($acl_reporting_console_node === false) {
|
if ($acl_reporting_console_node === false) {
|
||||||
include 'general/reporting_console_node.php';
|
include 'general/reporting_console_node.php';
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user