diff --git a/acl/CHANGELOG b/acl/CHANGELOG index 68c1c351a..d5cb83e9f 100644 --- a/acl/CHANGELOG +++ b/acl/CHANGELOG @@ -40,3 +40,5 @@ When editing a user who inherits some modules and ACL settings from a group, the ---- Changes since 1.380 ---- Fixed a bug that prevented cloning from copying detailed access control settings, and ensured that other user attributes like the group, theme, language and access times are cloned too. Added back the ability to edit the global ACL for groups. +---- Changes since 1.390 ---- +Updated the user interface to use the Webmin UI library. diff --git a/acl/index.cgi b/acl/index.cgi index e67806216..a1bf181e8 100755 --- a/acl/index.cgi +++ b/acl/index.cgi @@ -64,26 +64,26 @@ else { if ($access{'create'}); print &ui_links_row(\@rowlinks); - print "
| $text{'index_user'} | \n"; - print "$text{'index_modules'} |
| ", - &user_link($u, "edit_user.cgi", "user")," | \n"; if ($ingroup{$u->{'name'}}) { # Is a member of a group - &show_modules("user", $u->{'name'}, $u->{'ownmods'}, 0, - &text('index_modgroups', - "$ingroup{$u->{'name'}}->{'name'}")); + $smods = &show_modules( + "user", $u->{'name'}, $u->{'ownmods'}, 0, + &text('index_modgroups', + "$ingroup{$u->{'name'}}->{'name'}")); } else { # Is a stand-alone user - &show_modules("user", $u->{'name'}, $u->{'modules'}, 1); + $smods = &show_modules( + "user", $u->{'name'}, $u->{'modules'}, 1); } + print &ui_columns_row([ &user_link($u, "edit_user.cgi", "user"), + $smods ], [ "valign=top" ]); } - print "
\n"; } elsif ($config{'display'}) { + # Show just group names print &ui_form_start("delete_groups.cgi", "post"); &show_name_table(\@glist, "edit_group.cgi", $text{'index_gcreate'}, - $text{'index_group'}, "group"); + $text{'index_groups'}, "group"); print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]); $form++; } @@ -200,59 +201,50 @@ if (@icons) { sub show_modules { local ($type, $who, $mods, $global, $prefix) = @_; +local $rv; if ($config{'select'}) { # Show as drop-down menu - print "
\n"; + $rv .= &ui_form_end(); } else { # Show as table - print "| \n";
+ $rv .= $prefix." \n" if ($prefix); + local @grid; if ($access{'acl'}) { - print "$text{'index_global'} | ";
- $done = 1;
+ push(@grid, "$text{'index_global'}");
}
foreach $m (sort { $modname{$a} cmp $modname{$b} } @$mods) {
if ($modname{$m}) {
- if ($done%3 == 0) { print "
| "; if ($mcan{$m} && $access{'acl'}) { - print "$modname{$m}"; + push(@grid, "$modname{$m}"); } else { - print $modname{$m}; + push(@grid, $modname{$m}); } - print " | \n"; - if ($done%3 == 2) { print "
| \n"; } - print " |
| $_[3] | ||
|
\n"; -print "
| $text{'sessions_id'} | ", - "$text{'sessions_user'} | ", - "$text{'sessions_host'} | ", - $haslog ? "$text{'sessions_login'} | " : "", - "|||
| $k | \n"; + local @cols; + push(@cols, "$k"); if ($hasuser{$user}) { - print "$user | \n"; + push(@cols, "$user"); } elsif ($miniserv{'unixauth'}) { - print "$user ($miniserv{'unixauth'}) | \n"; + push(@cols, "$user ($miniserv{'unixauth'})"); } else { - print "$user | \n"; + push(@cols, $user); } - print "",($lip || " ")," | \n";
- local $tm = localtime($ltime);
- print "$tm | \n"; + push(@cols, $lip); + push(@cols, &make_date($ltime)); if ($haslog) { - print "$text{'sessions_lview'} | \n"; + push(@cols, "$text{'sessions_lview'}"); } - print "