--- un/lib/TWiki/Plugins/WebPermissionsPlugin.pm Fri Jul 21 15:04:31 2006 +++ WebPermissionsPlugin.pm Sat Aug 12 15:08:42 2006 @@ -1,7 +1,6 @@ # Plugin for TWiki Enterprise Collaboration Platform, http://TWiki.org/ # # Copyright (C) Evolved Media Network 2005 -# Copyright (C) Spanlink Communications 2006 # and TWiki Contributors. All Rights Reserved. TWiki Contributors # are listed in the AUTHORS file in the root of this distribution. # NOTE: Please extend that file, not this notice. @@ -37,7 +36,7 @@ $pluginName = 'WebPermissionsPlugin'; -$VERSION = '$Rev: 11083$'; +$VERSION = '$Rev: 220$'; $RELEASE = '1.000'; @@ -116,7 +115,9 @@ } # Commit changes to ACLs if( $changes ) { - TWiki::Func::setACLs( \@modes, $acls, $web ); + if($web=~/^([a-zA-Z0-9]*)$/) { + TWiki::Func::setACLs( \@modes, $acls, $1 ); + } } } $table{$web} = $acls; @@ -143,6 +144,7 @@ my $repeater = 0; my $row; foreach my $user ( sort @knownusers ) { + if($user=~/Group$/) { unless( $repeater ) { $row = CGI::th( '' ); foreach $web ( @webs ) { @@ -167,6 +169,35 @@ $row .= CGI::td( $cell ); } $tab .= CGI::Tr( $row ); + } + } + foreach my $user ( sort @knownusers ) { + if(not($user=~/Group$/)) { + unless( $repeater ) { + $row = CGI::th( '' ); + foreach $web ( @webs ) { + $row .= CGI::th( $web ); + } + $tab .= CGI::Tr( $row ); + $repeater = $repeat_heads; + } + $repeater--; + $row = CGI::th( ' '.$user.' ' ); + foreach $web ( sort @webs ) { + my $cell; + foreach my $op ( @modes ) { + if( $editing ) { + my %attrs = ( type => 'checkbox', name => $user.':'.$web.':'.$op ); + $attrs{checked} = 'checked' if $table{$web}->{$user}->{$op}; + $cell .= CGI::label( ($images{$op} || $op).CGI::input( \%attrs )); + } elsif( $table{$web}->{$user}->{$op} ) { + $cell .= $images{$op} || $op; + } + } + $row .= CGI::td( $cell ); + } + $tab .= CGI::Tr( $row ); + } } $tab .= CGI::end_table();