This commit is contained in:
Jamie Cameron
2021-01-24 13:59:17 -08:00
parent 792a4c93e6
commit e976c73ffc
8 changed files with 15 additions and 2 deletions

View File

@@ -21,7 +21,10 @@ print &ui_table_row($text{'acl_users'},
]), 3);
print &ui_table_row($text{'acl_allow'},
&ui_yesno_radio("allow", $o->{'allow'}));
&ui_yesno_radio("allow", $o->{'allow'}), 3);
print &ui_table_row($text{'acl_stop'},
&ui_yesno_radio("stop", $o->{'stop'}), 3);
}
# acl_security_save(&options)
@@ -34,5 +37,6 @@ $o->{'users'} = $in{'mode'} == 0 || $in{'mode'} == 3 ? "" :
$in{'mode'} == 1 ? $in{'userscan'}
: $in{'userscannot'};
$o->{'allow'} = $in{'allow'};
$o->{'stop'} = $in{'stop'};
}

View File

@@ -4,6 +4,7 @@
require './at-lib.pl';
&ReadParse();
&foreign_require("init");
$access{'stop'} || &error($text{'bootup_ecannot'});
$init = &get_init_name();
if ($in{'boot'}) {
&init::enable_at_boot($init);

View File

@@ -2,3 +2,4 @@ noconfig=0
users=
mode=0
allow=1
stop=1

View File

@@ -140,7 +140,7 @@ if ($access{'allow'} && $config{'allow_file'}) {
# If there is an init script that runs an atd server, show status
&foreign_require("init");
my $init = defined(&get_init_name) ? &get_init_name() : undef;
if ($init) {
if ($access{'stop'} && $init) {
print &ui_hr();
print &ui_buttons_start();

View File

@@ -55,6 +55,7 @@ acl_this=Current Webmin user
acl_only=Only users
acl_except=All except users
acl_allow=Can edit allowed At users?
acl_stop=Can stop and start <tt>atd</tt>?
run_title=Running Command
run_output=Output from scheduled command ..
@@ -79,5 +80,8 @@ log_bootdown=Disabled scheduled commands server at boot
stop_err=Failed to stop server
start_err=Failed to start server
stop_ecannot=You are not allowed to stop the server
start_ecannot=You are not allowed to start the server
bootup_ecannot=You are not allowed to enable the server at boot
__norefs=1

1
at/negativeacl Normal file
View File

@@ -0,0 +1 @@
stop=0

View File

@@ -3,6 +3,7 @@
require './at-lib.pl';
&error_setup($text{'start_err'});
$access{'stop'} || &error($text{'start_ecannot'});
&foreign_require("init");
my $init = &get_init_name();
my ($ok, $err) = &init::start_action($init);

View File

@@ -3,6 +3,7 @@
require './at-lib.pl';
&error_setup($text{'stop_err'});
$access{'stop'} || &error($text{'stop_ecannot'});
&foreign_require("init");
my $init = &get_init_name();
my ($ok, $err) = &init::stop_action($init);