diff --git a/man/defaultacl b/man/defaultacl new file mode 100644 index 000000000..888e286ce --- /dev/null +++ b/man/defaultacl @@ -0,0 +1 @@ +allow=1 diff --git a/man/index.cgi b/man/index.cgi index cacd3bbd8..24efccb62 100755 --- a/man/index.cgi +++ b/man/index.cgi @@ -62,7 +62,7 @@ print &ui_table_end(); print &ui_form_end([ [ undef, $text{'index_search'} ] ]); # Form to control search from other modules -if (!$module_info{'usermin'}) { +if (!$module_info{'usermin'} && $access{'allow'}) { @check = $config{'check'} ? split(/\s+/, $config{'check'}) : @search; print &ui_hr(); print &ui_form_start("save_check.cgi"); diff --git a/man/lang/en b/man/lang/en index c9a57743c..00231c25d 100644 --- a/man/lang/en +++ b/man/lang/en @@ -74,4 +74,8 @@ perl_title=Perl Module perl_header=Documentation for Perl module $1 perl_emod=Invalid Perl module name +acl_allow=Can edit allowed search types? + +check_ecannot=You are not allowed to edit allowed search types + __norefs=1 diff --git a/man/man-lib.pl b/man/man-lib.pl index d59da527c..7f81bc760 100755 --- a/man/man-lib.pl +++ b/man/man-lib.pl @@ -10,6 +10,7 @@ if ($module_info{'usermin'}) { $google_host = "www.google.com"; $google_port = 80; $google_page = "/search"; +%access = &get_module_acl(); # Get the paths to perl and perldoc $perl_path = &get_perl_path(); diff --git a/man/safeacl b/man/safeacl new file mode 100644 index 000000000..88bd58ac6 --- /dev/null +++ b/man/safeacl @@ -0,0 +1 @@ +allow=0 diff --git a/man/save_check.cgi b/man/save_check.cgi index 528ce89db..b3602d41b 100755 --- a/man/save_check.cgi +++ b/man/save_check.cgi @@ -4,6 +4,7 @@ # from help_search_link() require './man-lib.pl'; +$access{'allow'} || &error($text{'check_ecannot'}); &ReadParse(); &lock_file("$module_config_directory/config"); @check = split(/\0/, $in{'check'});