2 # Show a table of all profiles
4 require './rbac-lib.pl';
5 $access{'profs'} || &error($text{'profs_ecannot'});
6 &ui_print_header(undef, $text{'profs_title'}, "", "profs");
8 $profs = &list_prof_attrs();
10 print "<a href='edit_prof.cgi?new=1'>$text{'profs_add'}</a><br>\n"
11 if ($access{'profs'} == 1);
12 print &ui_columns_start(
13 [ $text{'profs_name'},
15 $text{'profs_auths'} ]);
16 foreach $p (sort { $a->{'name'} cmp $b->{'name'} } @$profs) {
17 print &ui_columns_row(
18 [ $access{'profs'} == 1 ?
19 "<a href='edit_prof.cgi?idx=$p->{'index'}'>$p->{'name'}</a>" :
21 &rbac_help_link($p, $p->{'desc'}),
22 &nice_comma_list($p->{'attr'}->{'auths'}),
25 print &ui_columns_end();
28 print "<b>$text{'profs_none'}</b><p>\n";
30 print "<a href='edit_prof.cgi?new=1'>$text{'profs_add'}</a><br>\n"
31 if ($access{'profs'} == 1);
33 &ui_print_footer("", $text{"index_return"});