WIP: Minor fixes

This commit is contained in:
Jose Gonzalez 2020-03-26 14:41:54 +01:00
parent e48ef76f35
commit 161c1eb643
3 changed files with 9 additions and 35 deletions

View File

@ -12,12 +12,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global vars
// TESTING
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// END
global $config;
check_login();
@ -25,7 +19,7 @@ check_login();
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
'ACL Violation',
'Trying to access Network Profile Management'
'Trying to access Wizard Setup'
);
include 'general/noaccess.php';
return;
@ -61,7 +55,7 @@ try {
$('#main_table_area').html(d);
},
error: function(d) {
alert('Failed trying update database! -> '+String(data)); // True, must change the message
alert('Failed trying update database -> '+String(data)); // True, must change the message
}
});

View File

@ -35,13 +35,10 @@ require_once 'include/functions_io.php';
require_once 'include/functions.php';
require_once $config['homedir'].'/include/class/ConfigPEN.class.php';
// Security.
if (! check_acl($config['id_user'], 0, 'PM')
&& ! check_acl($config['id_user'], 0, 'EW')
&& ! check_acl($config['id_user'], 0, 'EM')
) {
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
'ACL Violation',
'Trying to access to Wizard Setup'
'Trying to access to Wizard Setup Ajax'
);
include 'general/noaccess.php';
return;
@ -128,20 +125,7 @@ switch ($action) {
break;
}
// Make the data for return
$output = html_print_div(
[
'id' => 'ajax_message_show',
'content' => $message,
]
);
$output .= html_print_div(
[
'id' => 'ajax_main_table',
'content' => $configPEN->createMainTable(),
]
);
// Create the response data.
$output = $message.$configPEN->createMainTable();
// Return data.
echo $output;
// return $output;

View File

@ -53,16 +53,12 @@ class ConfigPEN extends HTML
// Check access.
check_login();
if (! check_acl($config['id_user'], 0, 'AR')) {
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
'ACL Violation',
'Trying to access event viewer'
'Trying to access PEN Definition feature'
);
/*
if (is_ajax()) {
echo json_encode(['error' => 'noaccess']);
}
*/
include 'general/noaccess.php';
exit;
}