Fix ACL check when editing keys

This commit is contained in:
Jamie Cameron
2026-08-03 11:28:48 -07:00
parent e235ff127b
commit b52cbb98d4
2 changed files with 4 additions and 5 deletions

View File

@@ -9,14 +9,11 @@
require './dhcpd-lib.pl';
require './params-lib.pl';
&ReadParse();
%access = &get_module_acl();
$access{'global'} || &error($text{'keys_ecannot'});
$conf = &get_config();
@keys = ( &find("key", $conf), { } );
# check acls
# %access = &get_module_acl();
# &error_setup($text{'eacl_aviol'});
# &error("$text{'eacl_np'} $text{'eacl_pss'}") if !&can('r',\%access,$sub);
if ($in{'new'}) {
&ui_print_header($desc, $text{'keys_create'}, "");
}

View File

@@ -8,6 +8,8 @@
require './dhcpd-lib.pl';
require './params-lib.pl';
&ReadParse();
%access = &get_module_acl();
$access{'global'} || &error($text{'keys_ecannot'});
&lock_all_files();
$conf = &get_config();