mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge branch 'ent-7240-error-acl-graficas-tree-view' into 'develop'
Fixed metaconsole ACL on module graphs view See merge request artica/pandorafms!3987
This commit is contained in:
commit
b609bbfdd9
@ -151,11 +151,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