Handle hostnames with upper-case letters
[webmin.git] / rbac / list_policy.cgi
1 #!/usr/local/bin/perl
2 # Show global policy settings
3
4 require './rbac-lib.pl';
5 $access{'policy'} || &error($text{'policy_ecannot'});
6 &ui_print_header(undef, $text{'policy_title'}, "", "policy");
7 $conf = &get_policy_config();
8
9 print &ui_form_start("save_policy.cgi", "post");
10 print &ui_table_start($text{'policy_header'}, "width=100%", 2);
11
12 print &ui_table_row($text{'policy_auths'},
13                     &auths_input("auths",
14                                  &find_policy_value("AUTHS_GRANTED", $conf)));
15
16 print &ui_table_row($text{'policy_profs'},
17         &profiles_input("profs", &find_policy_value("PROFS_GRANTED", $conf),1));
18
19 $allow = &find_policy_value("CRYPT_ALGORITHMS_ALLOW", $conf);
20 print &ui_table_row($text{'policy_allow'},
21         &ui_radio("allow_def", $allow ? 0 : 1,
22                   [ [ 1, $text{'default'} ],
23                     [ 0, $text{'policy_sel'} ] ])."<br>\n".
24         &crypt_algorithms_input("allow", $allow, 1));
25
26 $default = &find_policy_value("CRYPT_DEFAULT", $conf);
27 print &ui_table_row($text{'policy_default'},
28         &ui_radio("default_def", $default ? 0 : 1,
29                   [ [ 1, $text{'default'} ],
30                     [ 0, " " ] ])."\n".
31         &crypt_algorithms_input("default", $default, 0));
32
33 $deprecate = &find_policy_value("CRYPT_ALGORITHMS_DEPRECATE", $conf);
34 print &ui_table_row($text{'policy_deprecate'},
35         &ui_radio("deprecate_def", $deprecate ? 0 : 1,
36                   [ [ 1, $text{'policy_none'} ],
37                     [ 0, " " ] ])."\n".
38         &crypt_algorithms_input("deprecate", $deprecate, 0));
39
40 print &ui_table_end();
41 print &ui_form_end([ [ "save", $text{'save'} ] ]);
42
43 &ui_print_footer("", $text{'index_return'});
44