forked from webmin/webmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacl_security.pl
executable file
·51 lines (40 loc) · 1.69 KB
/
acl_security.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require 'mount-lib.pl';
# acl_security_form(&options)
# Output HTML for editing security options for the mount module
sub acl_security_form
{
print "<tr> <td><b>$text{'acl_fs'}</b></td>\n";
print "<td colspan=3>",&ui_opt_textbox("fs", $_[0]->{'fs'}, 40,
$text{'acl_all'}, $text{'acl_list'}),"</td> </tr>\n";
print "<tr> <td><b>$text{'acl_types'}</b></td>\n";
print "<td colspan=3>",&ui_opt_textbox("types", $_[0]->{'types'}, 30,
$text{'acl_all'}, $text{'acl_fslist'}),"</td> </tr>\n";
print "<tr> <td><b>$text{'acl_create'}</b></td>\n";
print "<td>",&ui_radio("create", $_[0]->{'create'},
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
print "<td><b>$text{'acl_only'}</b></td>\n";
print "<td>",&ui_radio("only", $_[0]->{'only'},
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
print "<tr> <td><b>$text{'acl_user'}</b></td>\n";
print "<td>",&ui_radio("user", $_[0]->{'user'},
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
print "<td><b>$text{'acl_hide'}</b></td>\n";
print "<td>",&ui_radio("hide", $_[0]->{'hide'},
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td> </tr>\n";
print "<tr> <td><b>$text{'acl_browse'}</b></td>\n";
print "<td>",&ui_radio("browse", $_[0]->{'browse'},
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]),"</td>\n";
print "</tr>\n";
}
# acl_security_save(&options)
# Parse the form for security options for the mount module
sub acl_security_save
{
$_[0]->{'fs'} = $in{'fs_def'} ? undef : $in{'fs'};
$_[0]->{'types'} = $in{'types_def'} ? undef : $in{'types'};
$_[0]->{'only'} = $in{'only'};
$_[0]->{'create'} = $in{'create'};
$_[0]->{'user'} = $in{'user'};
$_[0]->{'hide'} = $in{'hide'};
$_[0]->{'browse'} = $in{'browse'};
}