Handle hostnames with upper-case letters
[webmin.git] / rbac / list_auths.cgi
1 #!/usr/local/bin/perl
2 # Show a table of all authiles
3
4 require './rbac-lib.pl';
5 $access{'auths'} || &error($text{'auths_ecannot'});
6 &ui_print_header(undef, $text{'auths_title'}, "", "auths");
7
8 $auths = &list_auth_attrs();
9 if (@$auths) {
10         print "<a href='edit_auth.cgi?new=1'>$text{'auths_add'}</a><br>\n";
11         print &ui_columns_start(
12                 [ $text{'auths_name'},
13                   $text{'auths_desc'} ]);
14         foreach $a (sort { $a->{'name'} cmp $b->{'name'} } @$auths) {
15                 print &ui_columns_row(
16                         [ "<a href='edit_auth.cgi?idx=$a->{'index'}'>$a->{'name'}</a>",
17                           &rbac_help_link($a, $a->{'short'} || $a->{'desc'}),
18                         ]);
19                 }
20         print &ui_columns_end();
21         }
22 else {
23         print "<b>$text{'auths_none'}</b><p>\n";
24         }
25 print "<a href='edit_auth.cgi?new=1'>$text{'auths_add'}</a><br>\n";
26
27 &ui_print_footer("", $text{"index_return"});
28