Fix ACL check when editing keys
This commit is contained in:
+2
-5
@@ -9,14 +9,11 @@
|
|||||||
require './dhcpd-lib.pl';
|
require './dhcpd-lib.pl';
|
||||||
require './params-lib.pl';
|
require './params-lib.pl';
|
||||||
&ReadParse();
|
&ReadParse();
|
||||||
|
%access = &get_module_acl();
|
||||||
|
$access{'global'} || &error($text{'keys_ecannot'});
|
||||||
$conf = &get_config();
|
$conf = &get_config();
|
||||||
@keys = ( &find("key", $conf), { } );
|
@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'}) {
|
if ($in{'new'}) {
|
||||||
&ui_print_header($desc, $text{'keys_create'}, "");
|
&ui_print_header($desc, $text{'keys_create'}, "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
require './dhcpd-lib.pl';
|
require './dhcpd-lib.pl';
|
||||||
require './params-lib.pl';
|
require './params-lib.pl';
|
||||||
&ReadParse();
|
&ReadParse();
|
||||||
|
%access = &get_module_acl();
|
||||||
|
$access{'global'} || &error($text{'keys_ecannot'});
|
||||||
&lock_all_files();
|
&lock_all_files();
|
||||||
$conf = &get_config();
|
$conf = &get_config();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user