3 # Display usermin per-user or per-group module restrictions
5 require './usermin-lib.pl';
6 $access{'restrict'} || &error($text{'acl_ecannot'});
7 &ui_print_header(undef, $text{'restrict_title'}, "");
9 print &text('restrict_desc', "edit_acl.cgi"),"<p>\n";
11 @usermods = &list_usermin_usermods();
13 print "<a href='edit_restrict.cgi?new=1'>$text{'restrict_add'}",
15 print "<table border width=100%>\n";
16 print "<tr $tb> <td><b>$text{'restrict_who'}</b></td> ",
17 "<td><b>$text{'restrict_what'}</b></td> ",
18 "<td width=10><b>$text{'restrict_move'}</b></td> </tr>\n";
20 foreach $u (@usermods) {
22 print "<td nowrap><a href='edit_restrict.cgi?idx=$i'>",
23 $u->[0] eq "*" ? $text{'restrict_all'} :
24 $u->[0] =~ /^\@(.*)/ ?
25 &text('restrict_group', "<tt>$1</tt>") :
27 &text('restrict_file', "<tt>$u->[0]</tt>") :
28 "<tt>$u->[0]</tt>","</a></td>\n";
29 $mods = join(" ", map { "<tt>$_</tt>" } @{$u->[2]});
30 print "<td>",!$mods ? $text{'restrict_nomods'} :
31 &text($u->[1] eq "+" ? 'restrict_plus' :
32 $u->[1] eq "-" ? 'restrict_minus' :
36 if ($u eq $usermods[@usermods-1]) {
37 print "<img src=images/gap.gif>";
40 print "<a href='move.cgi?idx=$i&down=1'>",
41 "<img src=images/down.gif border=0></a>";
43 if ($u eq $usermods[0]) {
44 print "<img src=images/gap.gif>";
47 print "<a href='move.cgi?idx=$i&up=1'>",
48 "<img src=images/up.gif border=0></a>";
50 print "</td> </tr>\n";
56 print "<b>$text{'restrict_none'}</b><p>\n";
58 print "<a href='edit_restrict.cgi?new=1'>$text{'restrict_add'}</a><p>\n";
60 &ui_print_footer("", $text{'index_return'});