ACL fixes

This commit is contained in:
Alejandro Gallardo Escobar 2015-04-10 12:34:19 +02:00
parent d25c32b76d
commit 488c4976b0
1 changed files with 17 additions and 14 deletions

View File

@ -17,21 +17,24 @@ global $config;
check_login ();
// Visual console required
if (empty($visualConsole)) {
db_pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");
exit;
if (empty($idVisualConsole)) {
// ACL for the a new visual console
// if (!isset($vconsole_read))
// $vconsole_read = check_acl ($config['id_user'], 0, "VR");
if (!isset($vconsole_write))
$vconsole_write = check_acl ($config['id_user'], 0, "VW");
if (!isset($vconsole_manage))
$vconsole_manage = check_acl ($config['id_user'], 0, "VM");
}
else {
// ACL for the existing visual console
// if (!isset($vconsole_read))
// $vconsole_read = check_acl ($config['id_user'], $visualConsole['id_group'], "VR");
// $vconsole_read = check_acl ($config['id_user'], $idGroup, "VR");
if (!isset($vconsole_write))
$vconsole_write = check_acl ($config['id_user'], $visualConsole['id_group'], "VW");
$vconsole_write = check_acl ($config['id_user'], $idGroup, "VW");
if (!isset($vconsole_manage))
$vconsole_manage = check_acl ($config['id_user'], $visualConsole['id_group'], "VM");
$vconsole_manage = check_acl ($config['id_user'], $idGroup, "VM");
}
if (!$vconsole_write && !$vconsole_manage) {
db_pandora_audit("ACL Violation",