Merge branch 'ent-13545-usuarios-con-perfil-aw-pueden-ver-secciones-de-servidor-cuando-no-deberian' into 'develop'
Ent 13545 usuarios con perfil aw pueden ver secciones de servidor cuando no deberian See merge request artica/pandorafms!7201
This commit is contained in:
commit
39f7dc8a2d
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue