2 # Show global policy settings
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();
9 print &ui_form_start("save_policy.cgi", "post");
10 print &ui_table_start($text{'policy_header'}, "width=100%", 2);
12 print &ui_table_row($text{'policy_auths'},
14 &find_policy_value("AUTHS_GRANTED", $conf)));
16 print &ui_table_row($text{'policy_profs'},
17 &profiles_input("profs", &find_policy_value("PROFS_GRANTED", $conf),1));
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));
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'} ],
31 &crypt_algorithms_input("default", $default, 0));
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'} ],
38 &crypt_algorithms_input("deprecate", $deprecate, 0));
40 print &ui_table_end();
41 print &ui_form_end([ [ "save", $text{'save'} ] ]);
43 &ui_print_footer("", $text{'index_return'});