Fixed problems with menus and acl enterprise
This commit is contained in:
parent
f31698eced
commit
67f1765248
|
@ -230,7 +230,7 @@ $filters['offset'] = $offset;
|
|||
$filters['limit'] = $pagination;
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
if (!defined('METACONSOLE')) {
|
||||
$url = 'index.php?sec=reporting&sec2=godmode/reporting/map_builder&pagination='.$pagination;
|
||||
$url = 'index.php?sec=network&sec2=godmode/reporting/map_builder&pagination='.$pagination;
|
||||
}
|
||||
else {
|
||||
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pagination='.$pagination;
|
||||
|
@ -267,7 +267,7 @@ else {
|
|||
$data = array ();
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.
|
||||
$data[0] = '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.
|
||||
$map['id'].'&refr=' . $refr . '">'.$map['name'].'</a>';
|
||||
}
|
||||
else {
|
||||
|
@ -282,8 +282,8 @@ else {
|
|||
if ($vconsole_write || $vconsole_manage) {
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
|
||||
$data[4] = '<a class="delete_visualmap" href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">'.html_print_image ("images/cross.png", true).'</a>';
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
|
||||
$data[4] = '<a class="delete_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">'.html_print_image ("images/cross.png", true).'</a>';
|
||||
}
|
||||
else {
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
|
||||
|
@ -303,7 +303,7 @@ if ($maps) {
|
|||
if ($maps || defined("METACONSOLE")) {
|
||||
if ($vconsoles_write || $vconsoles_manage) {
|
||||
if (!defined('METACONSOLE')) {
|
||||
echo '<form action="index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder" method="post">';
|
||||
echo '<form action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder" method="post">';
|
||||
}
|
||||
else {
|
||||
echo '<form action="index.php?sec=screen&sec2=screens/screens&action=visualmap&action2=new&operation=new_visualmap&tab=data&pure=' . $pure . '" method="post">';
|
||||
|
|
|
@ -623,8 +623,8 @@ else
|
|||
$view_refresh = '300';
|
||||
|
||||
if (!defined('METACONSOLE')) {
|
||||
$url_base = 'index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&action=';
|
||||
$url_view = 'index.php?sec=reporting&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=' . $view_refresh;
|
||||
$url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action=';
|
||||
$url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id=' . $idVisualConsole . '&refr=' . $view_refresh;
|
||||
}
|
||||
else {
|
||||
$url_base = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=' . $pure . '&action2=';
|
||||
|
@ -637,7 +637,7 @@ $hash = md5($config["dbpass"] . $idVisualConsole . $config["id_user"]);
|
|||
$buttons = array();
|
||||
|
||||
$buttons['consoles_list'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' .
|
||||
'text' => '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' .
|
||||
html_print_image ("images/visual_console.png", true, array ("title" => __('Visual consoles list'))) .'</a>');
|
||||
$buttons['public_link'] = array('active' => false,
|
||||
'text' => '<a href="' . ui_get_full_url('operation/visual_console/public_console.php?hash='.$hash.'&id_layout='.$idVisualConsole.'&id_user='.$config["id_user"]) . '">'.
|
||||
|
|
|
@ -63,8 +63,8 @@ function menu_print_menu (&$menu) {
|
|||
if ($mainsec == 'class')
|
||||
continue;
|
||||
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec)) == false)
|
||||
continue;
|
||||
//~ if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec)) == false)
|
||||
//~ continue;
|
||||
|
||||
if (! isset ($main['id'])) {
|
||||
$id = 'menu_'.++$idcounter;
|
||||
|
@ -112,7 +112,10 @@ function menu_print_menu (&$menu) {
|
|||
|
||||
$subsec2 = io_safe_output($subsec2);
|
||||
// Choose valid suboptions (sec2)
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2)) == false) {
|
||||
$check_2 = true;
|
||||
if (isset($sub['sub2']))
|
||||
$check_2 = false;
|
||||
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2, $check_2)) == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -476,9 +479,12 @@ function menu_add_extras(&$menu) {
|
|||
$menu_extra['galertas']['sub']['godmode/alerts/configure_alert_template']['text'] = __('Configure alert template');
|
||||
|
||||
$menu_extra['network']['sub']['operation/agentes/networkmap']['text'] = __('Manage network map');
|
||||
$menu_extra['network']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
|
||||
$menu_extra['network']['sub']['godmode/reporting/visual_console_builder']['text'] = __('Builder visual console');
|
||||
|
||||
$menu_extra['eventos']['sub']['godmode/events/events']['text'] = __('Administration events');
|
||||
|
||||
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
|
||||
$menu_extra['reporting']['sub']['operation/visual_console/render_view']['text'] = __('View visual console');
|
||||
$menu_extra['reporting']['sub']['godmode/reporting/graph_builder']['text'] = __('Manage custom graphs');
|
||||
$menu_extra['reporting']['sub']['enterprise/dashboard/dashboard_replicate']['text'] = __('Copy dashboard');
|
||||
|
||||
|
@ -502,7 +508,9 @@ function menu_add_extras(&$menu) {
|
|||
$menu_extra['estado']['sub']['godmode/snmpconsole/snmp_alert']['text'] = __('SNMP alerts');
|
||||
$menu_extra['estado']['sub']['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters');
|
||||
$menu_extra['estado']['sub']['enterprise/godmode/snmpconsole/snmp_trap_editor']['text'] = __('SNMP trap editor');
|
||||
$menu_extra['estado']['sub']['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
|
||||
$menu_extra['estado']['sub']['snmpconsole']['sub2']['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator');
|
||||
|
||||
$menu_extra['estado']['sub']['snmpconsole']['sub2']['operation/snmpconsole/snmp_view']['text'] = __('SNMP console');
|
||||
|
||||
$menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident');
|
||||
|
||||
|
|
|
@ -89,8 +89,10 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
$sub2["operation/snmpconsole/snmp_view"]["text"] = __("SNMP console");
|
||||
$sub2["operation/snmpconsole/snmp_browser"]["text"] = __("SNMP browser");
|
||||
$sub2["operation/snmpconsole/snmp_mib_uploader"]["text"] = __("MIB uploader");
|
||||
$sub2["godmode/snmpconsole/snmp_filters"]["text"] = __("SNMP filters");
|
||||
$sub2["godmode/snmpconsole/snmp_trap_generator"]["text"] = __("SNMP trap generator");
|
||||
if (check_acl ($config['id_user'], 0, "LW")) {
|
||||
$sub2["godmode/snmpconsole/snmp_filters"]["text"] = __("SNMP filters");
|
||||
$sub2["godmode/snmpconsole/snmp_trap_generator"]["text"] = __("SNMP trap generator");
|
||||
}
|
||||
enterprise_hook ('snmpconsole_submenu');
|
||||
$sub["snmpconsole"]["sub2"] = $sub2;
|
||||
|
||||
|
|
|
@ -91,12 +91,12 @@ if (! $vconsole_read) {
|
|||
$options = array();
|
||||
|
||||
$options['consoles_list']['text'] =
|
||||
'<a href="index.php?sec=reporting&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' .
|
||||
'<a href="index.php?sec=network&sec2=godmode/reporting/map_builder&refr=' . $refr . '">' .
|
||||
html_print_image ("images/visual_console.png", true,
|
||||
array ("title" => __('Visual consoles list'))) . '</a>';
|
||||
|
||||
if ($vconsole_write || $vconsole_manage) {
|
||||
$url_base = 'index.php?sec=reporting&sec2=godmode/reporting/visual_console_builder&action=';
|
||||
$url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action=';
|
||||
|
||||
$hash = md5($config["dbpass"] . $id_layout . $config["id_user"]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue