Update check permisisons

This commit is contained in:
markjcrane
2025-11-02 00:22:57 -06:00
parent 422fee7f23
commit b0eabca1f6
243 changed files with 299 additions and 1008 deletions

View File

@@ -25,10 +25,7 @@
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('event_guard_log_add') || permission_exists('event_guard_log_edit')) {
//access granted
}
else {
if (!permission_exists('event_guard_log_add') || !permission_exists('event_guard_log_edit')) {
echo "access denied";
exit;
}

View File

@@ -29,10 +29,7 @@
require_once "resources/paging.php";
//check permissions
if (permission_exists('event_guard_log_view')) {
//access granted
}
else {
if (!permission_exists('event_guard_log_view')) {
echo "access denied";
exit;
}

View File

@@ -447,7 +447,7 @@
if ($firewall_name == 'iptables') {
$command = $firewall_path.'/./iptables -L '.$filter.' -n --line-numbers | grep "'.$ip_address.' " | cut -d " " -f1';
$line_number = trim(shell($command));
echo "\n". $command . " line ".__line__." result ".$result."\n";
echo "\n". $command . " line ".__line__."\n";
if (is_numeric($line_number)) {
//$result = shell('iptables -D INPUT '.$line_number);
$command = $firewall_path.'/./iptables -D '.$filter.' '.$line_number;