mirror of
https://github.com/webmin/webmin.git
synced 2026-10-28 14:11:03 +00:00
This patch completes the ACL added in [17ba87cbc](https://github.com/webmin/webmin/commit/17ba87cbc).
That change protected only the edit and save pages.
Users without environment-variable access could still change variables through delete, bulk actions, and moves.
This applies the permission everywhere and hides blocked controls.
It also applies create and delete permissions to variables and prevents job and variable endpoints from being mixed.
18 lines
471 B
Perl
Executable File
18 lines
471 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# delete_cron.cgi
|
|
# Delete a cron job for some user
|
|
|
|
require './cron-lib.pl';
|
|
&ReadParse();
|
|
@jobs = &list_cron_jobs();
|
|
$job = $jobs[$in{'idx'}];
|
|
$job && !$job->{'name'} || &error($text{'edit_egone'});
|
|
$access{'delete'} && &can_edit_user(\%access, $job->{'user'}) ||
|
|
&error($text{'edit_ecannot'});
|
|
&lock_file($job->{'file'});
|
|
&delete_cron_job($job);
|
|
&unlock_file($job->{'file'});
|
|
&webmin_log("delete", "cron", $job->{'user'}, $job);
|
|
&redirect("");
|
|
|