mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed metaconsole ACL on module graphs view
This commit is contained in:
parent
321fc8aa05
commit
d0bddbe27c
@ -145,11 +145,34 @@ ui_print_message_dialog(
|
|||||||
|
|
||||||
// ACL.
|
// ACL.
|
||||||
$all_groups = agents_get_all_groups_agent($agent_id);
|
$all_groups = agents_get_all_groups_agent($agent_id);
|
||||||
if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) {
|
|
||||||
|
// If in metaconsole, resotre DB to check meta user acl.
|
||||||
|
if (is_metaconsole()) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AR') !== true) {
|
||||||
include $config['homedir'].'/general/noaccess.php';
|
include $config['homedir'].'/general/noaccess.php';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Metaconsole connection to the node.
|
||||||
|
$server_id = (int) get_parameter('server', 0);
|
||||||
|
if (is_metaconsole() === true && empty($server_id) === false) {
|
||||||
|
$server = metaconsole_get_connection_by_id($server_id);
|
||||||
|
// Error connecting.
|
||||||
|
if (metaconsole_connect($server) !== NOERR) {
|
||||||
|
echo '<html>';
|
||||||
|
echo '<body>';
|
||||||
|
ui_print_error_message(
|
||||||
|
__('There was a problem connecting with the node')
|
||||||
|
);
|
||||||
|
echo '</body>';
|
||||||
|
echo '</html>';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$draw_alerts = get_parameter('draw_alerts', 0);
|
$draw_alerts = get_parameter('draw_alerts', 0);
|
||||||
|
|
||||||
$period = get_parameter('period');
|
$period = get_parameter('period');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user