<& /Admin/Elements/Header, Title => 'Modify System ACLS' &>
<& /Admin/Elements/SystemTabs &>
  
<& /Elements/ListActions, actions => \@results &>
  <FORM METHOD=POST action="GroupRights.html">
      


<h2>Modify global rights for groups</h2>

<TABLE>
<TR><TD>Pseudogroups</TD></TR>
% while (my $GroupObj = $PseudoGroups->Next()) {
	      
	      <TR ALIGN=RIGHT> 
		<TD VALIGN=TOP>
		  <% $GroupObj->Name %>
		</TD>
		<TD>
	    <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj, 
                                   PrincipalType => 'Group',
                                   Scope => 'System' &>
		</TD>
	      </TR>
	
% }

<TR><TD>Groups</TD></TR>

% while (my $GroupObj = $Groups->Next()) {
	      
	      <TR ALIGN=RIGHT> 
		<TD VALIGN=TOP>
		  <% $GroupObj->Name %>
		</TD>
		<TD>
	    <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj, 
                                   PrincipalType => 'Group',
                                   Scope => 'System' &>
		</TD>
	      </TR>
	
% }
	
      </TABLE>
    <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &>
  </FORM>
  
  <%INIT>
 
   #Update the acls.
 my @results =  ProcessACLChanges(\@CheckACL, \%ARGS);

        
    # {{{ do basic initialization.
    
  
  
  # Find out which groups we want to display ACL selects for.
  my $Groups = new RT::Groups($session{'CurrentUser'});
  #TODO: limit this to non-pseudogroups
  $Groups->LimitToReal();


  my $PseudoGroups = new RT::Groups($session{'CurrentUser'});
  #TODO: limit this to non-pseudogroups
  $PseudoGroups->LimitToPseudo;

  # }}}
    
  

  
  </%INIT>

<%ARGS>
@CheckACL => undef
</%ARGS>
