Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 43 lines (35 sloc) 1.22 kb
fc1c1b2 @jcameron Initial checkin of Webmin
jcameron authored
1
2 require 'htaccess-lib.pl';
3
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the htaccess module
6 sub acl_security_form
7 {
0d1436c @jcameron New ACL option to allow editing of users and groups only
jcameron authored
8 # Write files as user
9 print &ui_table_row($text{'acl_user'},
10 &ui_radio("user_def", $_[0]->{'user'} eq "*" ? 1 : 0,
11 [ [ 1, $text{'acl_same'} ],
12 [ 0, &unix_user_input("user",
13 $_[0]->{'user'} eq "*" ? "" : $_[0]->{'user'}) ] ]), 3);
fc1c1b2 @jcameron Initial checkin of Webmin
jcameron authored
14
0d1436c @jcameron New ACL option to allow editing of users and groups only
jcameron authored
15 # Allowed directories
16 print &ui_table_row($text{'acl_dirs'},
17 &ui_textarea("dirs", join("\n", split(/\t+/, $_[0]->{'dirs'})),
18 5, 60)."<br>".
19 &ui_checkbox("home", 1, $text{'acl_home'}, $_[0]->{'home'}), 3);
fc1c1b2 @jcameron Initial checkin of Webmin
jcameron authored
20
0d1436c @jcameron New ACL option to allow editing of users and groups only
jcameron authored
21 # Allow sync setup
22 print &ui_table_row($text{'acl_sync'},
23 &ui_yesno_radio("sync", $_[0]->{'sync'}));
24
25 # Limit to user/group editing
26 print &ui_table_row($text{'acl_uonly'},
27 &ui_radio("uonly", $_[0]->{'uonly'},
28 [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
fc1c1b2 @jcameron Initial checkin of Webmin
jcameron authored
29 }
30
31 # acl_security_save(&options)
32 # Parse the form for security options for the cron module
33 sub acl_security_save
34 {
35 $_[0]->{'user'} = $in{'user_def'} ? "*" : $in{'user'};
36 $in{'dirs'} =~ s/\r//g;
37 $_[0]->{'dirs'} = join("\t", split(/\n/, $in{'dirs'}));
38 $_[0]->{'home'} = $in{'home'};
39 $_[0]->{'sync'} = $in{'sync'};
0d1436c @jcameron New ACL option to allow editing of users and groups only
jcameron authored
40 $_[0]->{'uonly'} = $in{'uonly'};
fc1c1b2 @jcameron Initial checkin of Webmin
jcameron authored
41 }
42
Something went wrong with that request. Please try again.