mirror of
https://github.com/webmin/webmin.git
synced 2026-10-21 19:50:40 +01:00
Add new ACL option to limit use of environment variables
This commit is contained in:
@@ -48,6 +48,10 @@ print &ui_table_row($text{'acl_move'},
|
|||||||
&ui_radio("move", $_[0]->{'move'},
|
&ui_radio("move", $_[0]->{'move'},
|
||||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||||
|
|
||||||
|
print &ui_table_row($text{'acl_env'},
|
||||||
|
&ui_radio("env", $_[0]->{'env'},
|
||||||
|
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||||
|
|
||||||
print &ui_table_row($text{'acl_kill'},
|
print &ui_table_row($text{'acl_kill'},
|
||||||
&ui_radio("kill", $_[0]->{'kill'},
|
&ui_radio("kill", $_[0]->{'kill'},
|
||||||
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
|
||||||
@@ -79,6 +83,7 @@ $_[0]->{'command'} = $in{'command'};
|
|||||||
$_[0]->{'create'} = $in{'create'};
|
$_[0]->{'create'} = $in{'create'};
|
||||||
$_[0]->{'delete'} = $in{'delete'};
|
$_[0]->{'delete'} = $in{'delete'};
|
||||||
$_[0]->{'move'} = $in{'move'};
|
$_[0]->{'move'} = $in{'move'};
|
||||||
|
$_[0]->{'env'} = $in{'env'};
|
||||||
$_[0]->{'kill'} = $in{'kill'};
|
$_[0]->{'kill'} = $in{'kill'};
|
||||||
$_[0]->{'hourly'} = $in{'hourly'};
|
$_[0]->{'hourly'} = $in{'hourly'};
|
||||||
$_[0]->{'stop'} = $in{'stop'};
|
$_[0]->{'stop'} = $in{'stop'};
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ command=1
|
|||||||
create=1
|
create=1
|
||||||
delete=1
|
delete=1
|
||||||
move=1
|
move=1
|
||||||
|
env=1
|
||||||
kill=1
|
kill=1
|
||||||
hourly=2
|
hourly=2
|
||||||
stop=1
|
stop=1
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
require './cron-lib.pl';
|
require './cron-lib.pl';
|
||||||
&ReadParse();
|
&ReadParse();
|
||||||
|
$access{'env'} || &error($text{'env_ecannot'});
|
||||||
|
|
||||||
if (!$in{'new'}) {
|
if (!$in{'new'}) {
|
||||||
@jobs = &list_cron_jobs();
|
@jobs = &list_cron_jobs();
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ env_where2=Move environment variable
|
|||||||
env_top=Before all Cron jobs for user
|
env_top=Before all Cron jobs for user
|
||||||
env_bot=After all Cron jobs
|
env_bot=After all Cron jobs
|
||||||
env_leave=Current position
|
env_leave=Current position
|
||||||
|
env_ecannot=You are not allowed to edit environment variables
|
||||||
|
|
||||||
exec_title=Execute Cron Job
|
exec_title=Execute Cron Job
|
||||||
exec_ecannot=You are not allowed to execute cron jobs for this user
|
exec_ecannot=You are not allowed to execute cron jobs for this user
|
||||||
@@ -134,6 +135,7 @@ acl_gid=Users with primary group
|
|||||||
acl_create=Can create Cron jobs?
|
acl_create=Can create Cron jobs?
|
||||||
acl_delete=Can delete Cron jobs?
|
acl_delete=Can delete Cron jobs?
|
||||||
acl_move=Can move Cron jobs?
|
acl_move=Can move Cron jobs?
|
||||||
|
acl_env=Can edit environment variables?
|
||||||
acl_kill=Can terminate Cron jobs?
|
acl_kill=Can terminate Cron jobs?
|
||||||
acl_hourly=Limit jobs to at most hourly?
|
acl_hourly=Limit jobs to at most hourly?
|
||||||
acl_hourlydef=As set in Module Config
|
acl_hourlydef=As set in Module Config
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ command=1
|
|||||||
create=1
|
create=1
|
||||||
delete=1
|
delete=1
|
||||||
move=1
|
move=1
|
||||||
|
env=0
|
||||||
kill=1
|
kill=1
|
||||||
hourly=0
|
hourly=0
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
require './cron-lib.pl';
|
require './cron-lib.pl';
|
||||||
&error_setup($text{'env_err'});
|
&error_setup($text{'env_err'});
|
||||||
&ReadParse();
|
&ReadParse();
|
||||||
|
$access{'env'} || &error($text{'env_ecannot'});
|
||||||
|
|
||||||
@jobs = &list_cron_jobs();
|
@jobs = &list_cron_jobs();
|
||||||
if ($in{'new'}) {
|
if ($in{'new'}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user