diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 649e730155..3440719a89 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -386,52 +386,32 @@ if ($access_console_node === true) { $menu_godmode['galertas']['sub'] = $sub; } - if ((bool) check_acl($config['id_user'], 0, 'AW') === true || (bool) check_acl($config['id_user'], 0, 'PM') === true) { + if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { // Servers. $menu_godmode['gservers']['text'] = __('Servers'); $menu_godmode['gservers']['sec2'] = 'godmode/servers/modificar_server'; $menu_godmode['gservers']['id'] = 'god-servers'; - $sub = []; - - if ((bool) check_acl($config['id_user'], 0, 'AW') === true) { - $sub['godmode/servers/modificar_server']['text'] = __('Manage servers'); - $sub['godmode/servers/modificar_server']['id'] = 'Manage_servers'; - } - - if ((bool) check_acl($config['id_user'], 0, 'PM') === true - || is_user_admin($config['id_user']) === true - ) { - $sub['godmode/consoles/consoles']['text'] = __('Manage consoles'); - $sub['godmode/consoles/consoles']['id'] = 'Manage consoles'; - } - + $sub['godmode/servers/modificar_server']['text'] = __('Manage servers'); + $sub['godmode/servers/modificar_server']['id'] = 'Manage_servers'; + $sub['godmode/consoles/consoles']['text'] = __('Manage consoles'); + $sub['godmode/consoles/consoles']['id'] = 'Manage consoles'; // This subtabs are only for Pandora Admin. - if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { - enterprise_hook('ha_cluster'); - - $sub['godmode/servers/plugin']['text'] = __('Plugins'); - $sub['godmode/servers/plugin']['id'] = 'Plugins'; - - $sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin'); - $sub['godmode/servers/plugin_registration']['id'] = 'register_plugin'; - - enterprise_hook('export_target_submenu'); - - enterprise_hook('manage_satellite_submenu'); - } - + enterprise_hook('ha_cluster'); + $sub['godmode/servers/plugin']['text'] = __('Plugins'); + $sub['godmode/servers/plugin']['id'] = 'Plugins'; + $sub['godmode/servers/plugin_registration']['text'] = __('Register Plugin'); + $sub['godmode/servers/plugin_registration']['id'] = 'register_plugin'; + enterprise_hook('export_target_submenu'); + enterprise_hook('manage_satellite_submenu'); $menu_godmode['gservers']['sub'] = $sub; - } - if ((bool) check_acl($config['id_user'], 0, 'PM') === true) { // Setup. $menu_godmode['gsetup']['text'] = __('Settings'); $menu_godmode['gsetup']['sec2'] = 'general'; $menu_godmode['gsetup']['id'] = 'god-setup'; $sub = []; - // Options Setup. $sub['general']['text'] = __('System Settings'); $sub['general']['id'] = 'Setup'; @@ -457,41 +437,31 @@ if ($access_console_node === true) { $sub2['godmode/setup/setup§ion=vis']['text'] = __('Visual styles'); $sub2['godmode/setup/setup§ion=vis']['refr'] = 0; - if ((bool) check_acl($config['id_user'], 0, 'AW') === true) { - if ((bool) $config['activate_netflow'] === true) { - $sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow'); - $sub2['godmode/setup/setup§ion=net']['refr'] = 0; - } + if ((bool) $config['activate_netflow'] === true) { + $sub2['godmode/setup/setup§ion=net']['text'] = __('Netflow'); + $sub2['godmode/setup/setup§ion=net']['refr'] = 0; + } - if ((bool) $config['activate_sflow'] === true) { - $sub2['godmode/setup/setup§ion=sflow']['text'] = __('Sflow'); - $sub2['godmode/setup/setup§ion=sflow']['refr'] = 0; - } + if ((bool) $config['activate_sflow'] === true) { + $sub2['godmode/setup/setup§ion=sflow']['text'] = __('Sflow'); + $sub2['godmode/setup/setup§ion=sflow']['refr'] = 0; } $sub2['godmode/setup/setup§ion=pandorarc']['text'] = __('Pandora RC'); $sub2['godmode/setup/setup§ion=pandorarc']['refr'] = 0; - $sub2['godmode/setup/setup§ion=ITSM']['text'] = __('ITSM'); $sub2['godmode/setup/setup§ion=ITSM']['refr'] = 0; - enterprise_hook('module_library_submenu'); - $sub2['godmode/setup/setup§ion=notifications']['text'] = __('Notifications'); $sub2['godmode/setup/setup§ion=notifications']['refr'] = 0; - $sub2['godmode/setup/setup§ion=quickshell']['text'] = __('QuickShell'); $sub2['godmode/setup/setup§ion=quickshell']['refr'] = 0; - $sub2['godmode/setup/setup§ion=external_tools']['text'] = __('External Tools'); $sub2['godmode/setup/setup§ion=external_tools']['refr'] = 0; - $sub2['godmode/setup/setup§ion=welcome_tips']['text'] = __('Welcome Tips'); $sub2['godmode/setup/setup§ion=welcome_tips']['refr'] = 0; - $sub2['godmode/setup/setup§ion=demo_data']['text'] = __('Demo data'); $sub2['godmode/setup/setup§ion=demo_data']['refr'] = 0; - if ((bool) $config['activate_gis'] === true) { $sub2['godmode/setup/setup§ion=gis']['text'] = __('Map conections GIS'); } diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index e4c5d7aa09..1c3e90c84e 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -34,7 +34,7 @@ require_once $config['homedir'].'/include/functions_graph.php'; check_login(); -if (! check_acl($config['id_user'], 0, 'AW')) { +if (! check_acl($config['id_user'], 0, 'PM')) { db_pandora_audit( AUDIT_LOG_ACL_VIOLATION, 'Trying to access Server Management'