jvanzyl     01/05/22 07:53:26

  Modified:    src/templates/screens/group FluxGroupForm.vm
                        FluxGroupList.vm
               src/templates/screens/permission FluxPermissionForm.vm
                        FluxPermissionList.vm
               src/templates/screens/role FluxRoleForm.vm FluxRoleList.vm
                        FluxRolePermissionForm.vm
               src/templates/screens/user FluxUserForm.vm FluxUserList.vm
                        FluxUserRoleForm.vm
  Added:       src/java/org/apache/turbine/flux/tools FluxTool.java
  Log:
  - adding pull tool
  - all templates now use the flux pull tool thanks to jmcnally.
  
  Revision  Changes    Path
  1.1                  
jakarta-turbine-flux/src/java/org/apache/turbine/flux/tools/FluxTool.java
  
  Index: FluxTool.java
  ===================================================================
  package org.apache.turbine.flux.tools;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and 
   *    "Apache Turbine" must not be used to endorse or promote products 
   *    derived from this software without prior written permission. For 
   *    written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Turbine", nor may "Apache" appear in their name, without 
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import java.util.Vector;
  import java.util.Iterator;
  
  import org.apache.velocity.context.Context;
  
  import org.apache.turbine.om.security.Group;
  import org.apache.turbine.om.security.Role;
  import org.apache.turbine.om.security.Permission;
  import org.apache.turbine.om.security.User;
  import org.apache.turbine.util.security.AccessControlList;
  import org.apache.turbine.om.security.peer.TurbineUserPeer;
  import org.apache.turbine.util.RunData;
  import org.apache.turbine.util.db.Criteria;
  import org.apache.turbine.util.template.SelectorBox;
  import org.apache.turbine.services.security.TurbineSecurity;
  import org.apache.turbine.services.pull.ApplicationTool;
  import org.apache.turbine.util.pool.Recyclable;
  import org.apache.turbine.util.Log;
  
  /**
   * The pull api for flux templates
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>John D. McNally</a>
   */
  public class FluxTool 
      implements Recyclable, ApplicationTool
  {
      /** 
       * The object containing request specific data 
       */
      private RunData data;
  
      /**
       * A Group object for use within the Flux API.
       */
      private Group group = null;
  
      /**
       * A Issue object for use within the Flux API.
       */
      private Role role = null;
  
      /**
       * A Permission object for use within the Flux API.
       */
      private Permission permission = null;
  
      /**
       * A User object for use within the Flux API.
       */
      private User user = null;
  
      
      public void init(Object data)
      {
          this.data = (RunData)data;
      }
  
      /**
       * nulls out the issue and user objects
       */
      public void refresh()
      {
          // do not need since it is a request tool
      }
  
      /**
       * Constructor does initialization stuff
       */    
      public FluxTool()
      {
      }
  
  
      public Group getGroup()
          throws Exception
      {
          if (group == null)
          {
              String name = data.getParameters().getString("name"); 
              if ( name == null || name.length() == 0)
              {
                  group = TurbineSecurity.getNewGroup(null);
              }
              else 
              {
                  group = TurbineSecurity.getGroup(name);
              }
          }
          return group;
      }
  
      public String getMode()
      {
          return data.getParameters().getString("mode");
      }
  
  
      public Group[] getGroups()
          throws Exception
      { 
          return TurbineSecurity.getAllGroups().getGroupsArray();
      }
  
      public Role getRole()
          throws Exception
      {
          if (role == null)
          {
              String name = data.getParameters().getString("name"); 
              if ( name == null || name.length() == 0)
              {
                  role = TurbineSecurity.getNewRole(null);  
              }
              else 
              {
                  role = TurbineSecurity.getRole(name);
              }
          }
          return role;
      }
  
      /**
       */
      public Role[] getRoles()
          throws Exception
      {
          Criteria criteria = new Criteria();
          System.out.println("Getting roles");
          System.out.println("roles.size=" + 
TurbineSecurity.getRoles(criteria).getRolesArray().length);
          return TurbineSecurity.getRoles(criteria).getRolesArray();
      }
  
      public Permission getPermission()
          throws Exception
      {
          if (permission == null)
          {
              String name = data.getParameters().getString("name"); 
              if ( name == null || name.length() == 0)
              {
                  permission = TurbineSecurity.getNewPermission(null);  
              }
              else 
              {
                  permission = TurbineSecurity.getPermission(name);
              }
          }
          return permission;
      }
  
      /**
       * Get all permissions.
       */
      public Permission[] getPermissions()
          throws Exception
      {
          return TurbineSecurity.getAllPermissions().getPermissionsArray();
      }
  
      public User getUser()
          throws Exception
      {
          if (user == null)
          {
              String name = data.getParameters().getString("username"); 
              if ( name == null || name.length() == 0)
              {
                  user = TurbineSecurity.getUserInstance();  
              }
              else 
              {
                  user = TurbineSecurity.getUser(name);
              }
          }
          return user;
      }
  
      public AccessControlList getACL()
          throws Exception
      {
          return  TurbineSecurity.getACL(getUser());
      }
  
  
  
      /**
       */
      public SelectorBox getFieldList() throws Exception
      {
          Object[] names = {"username", "firstname", "middlename", "lastname"}; 
          Object[] values = 
              { "Username", "First Name", "Middle Name", "Last Name" };
          return  new SelectorBox("fieldList", names, values);
      }
  
      /**
       */
      public SelectorBox getUserFieldList() 
          throws Exception
      {
          /**
           * This is a tie to the DB implementation
           * something should be added the pluggable pieces
           * to allow decent parameterized searching.
           */
      
          Object[] names = 
          { 
              TurbineUserPeer.USERNAME, 
              TurbineUserPeer.FIRST_NAME, 
              TurbineUserPeer.LAST_NAME 
          }; 
          
          Object[] values = 
          { 
              "User Name" , 
              "First Name", 
              "Last Name" 
          };
  
          return  new SelectorBox("fieldList", names, values);
      }
  
      /**
       * Select all the users and place them in an array
       * that can be used within the UserList.vm template.
       */
      public User[] getUsers() 
          throws Exception
      {
          Criteria criteria = new Criteria();
          
          String fieldList = data.getParameters().getString("fieldList");
          
          if (fieldList != null)
          {
              /*
               * This is completely database centric.
               */
              String searchField = data.getParameters().getString("searchField");
              
              /*
               * Does this tie this admin app to a database
               * implementation? And our implementation at
               * that?
               */
              
              /*
               * How the hell do you make a where name like 'j%'
               * type statement with Criteria?
               */
              criteria.add(fieldList, (Object) searchField, Criteria.LIKE);
          }
          
          return TurbineSecurity.getUsers(criteria);
      }
  
      // ****************** Recyclable implementation ************************
  
      private boolean disposed;
  
      /**
       * Recycles the object for a new client. Recycle methods with
       * parameters must be added to implementing object and they will be
       * automatically called by pool implementations when the object is
       * taken from the pool for a new client. The parameters must
       * correspond to the parameters of the constructors of the object.
       * For new objects, constructors can call their corresponding recycle
       * methods whenever applicable.
       * The recycle methods must call their super.
       */
      public void recycle()
      {
          disposed = false;
      }
  
      /**
       * Disposes the object after use. The method is called
       * when the object is returned to its pool.
       * The dispose method must call its super.
       */
      public void dispose()
      {
          data = null;
          user = null;
          group = null;
          role = null;
          permission = null;
  
          disposed = true;
      }
  
      /**
       * Checks whether the recyclable has been disposed.
       * @return true, if the recyclable is disposed.
       */
      public boolean isDisposed()
      {
          return disposed;
      }
  }
  
  
  
  1.2       +6 -4      
jakarta-turbine-flux/src/templates/screens/group/FluxGroupForm.vm
  
  Index: FluxGroupForm.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/group/FluxGroupForm.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxGroupForm.vm  2001/03/26 00:49:38     1.1
  +++ FluxGroupForm.vm  2001/05/22 14:51:26     1.2
  @@ -1,7 +1,7 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxGroupForm.vm,v 1.1 2001/03/26 00:49:38 jvanzyl Exp $
  +@version $Id: FluxGroupForm.vm,v 1.2 2001/05/22 14:51:26 jvanzyl Exp $
   
   *#
   
  @@ -30,7 +30,7 @@
         #end
         
         <tr>
  -        #formCell ("Group Name" "name" $!group.Name)
  +        #formCell ("Group Name" "name" $!flux.Group.Name)
         </tr>
   
         <tr>
  @@ -42,9 +42,9 @@
   
             <font face="$ui.sansSerifFonts">
   
  -          #if ($mode == "modify")
  +          #if ($flux.Mode == "modify")
               <input type="submit" name="eventSubmit_doUpdate" value="Update Group"/>
  -          #elseif ($mode == "delete")
  +          #elseif ($flux.Mode == "delete")
               <input type="submit" name="eventSubmit_doDelete" value="Confirm 
Deletion"/>
             #else
               <input type="submit" name="eventSubmit_doInsert" value="Add Group"/>
  @@ -55,7 +55,9 @@
        </tr>
     </table>
     </div>
  +<!-- why is this here? !FIXME!
     <input type="hidden" name="userid" value="$!user.UserId"/>
  +-->
   </form>
   
   #if ($showEmbeddedMenu)
  
  
  
  1.2       +3 -3      
jakarta-turbine-flux/src/templates/screens/group/FluxGroupList.vm
  
  Index: FluxGroupList.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/group/FluxGroupList.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxGroupList.vm  2001/03/26 00:49:38     1.1
  +++ FluxGroupList.vm  2001/05/22 14:51:29     1.2
  @@ -1,7 +1,7 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxGroupList.vm,v 1.1 2001/03/26 00:49:38 jvanzyl Exp $
  +@version $Id: FluxGroupList.vm,v 1.2 2001/05/22 14:51:29 jvanzyl Exp $
   
   *#
   
  @@ -19,7 +19,7 @@
           <tr>
           <form action="">
             <td align="left">
  -            #listBox ($fieldList)
  +            #listBox ($flux.FieldList)
             </td>
             <td align="right">
               #textField("searchField" "*" "20")
  @@ -45,7 +45,7 @@
             #end
           </tr>
           
  -        #foreach ($group in $groups)
  +        #foreach ($group in $flux.Groups)
           <tr>
             #entryCell ($group.Name)
             <td>
  
  
  
  1.2       +6 -4      
jakarta-turbine-flux/src/templates/screens/permission/FluxPermissionForm.vm
  
  Index: FluxPermissionForm.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/permission/FluxPermissionForm.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxPermissionForm.vm     2001/03/26 00:49:38     1.1
  +++ FluxPermissionForm.vm     2001/05/22 14:51:46     1.2
  @@ -1,7 +1,7 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxPermissionForm.vm,v 1.1 2001/03/26 00:49:38 jvanzyl Exp $
  +@version $Id: FluxPermissionForm.vm,v 1.2 2001/05/22 14:51:46 jvanzyl Exp $
   
   *#
   
  @@ -30,7 +30,7 @@
         #end
         
         <tr>
  -        #formCell ("Permission Name" "name" $!permission.Name)
  +        #formCell ("Permission Name" "name" $!flux.Permission.Name)
         </tr>
   
         <tr>
  @@ -42,9 +42,9 @@
   
             <font face="$ui.sansSerifFonts">
   
  -          #if ($mode == "modify")
  +          #if ($flux.Mode == "modify")
               <input type="submit" name="eventSubmit_doUpdate" value="Update 
Permission"/>
  -          #elseif ($mode == "delete")
  +          #elseif ($flux.Mode == "delete")
               <input type="submit" name="eventSubmit_doDelete" value="Confirm 
Deletion"/>
             #else
               <input type="submit" name="eventSubmit_doInsert" value="Add 
Permission"/>
  @@ -55,7 +55,9 @@
        </tr>
     </table>
     </div>
  +<!-- why is this here? !FIXME!
     <input type="hidden" name="userid" value="$!user.UserId"/>
  +-->
   </form>
   
   #if ($showEmbeddedMenu)
  
  
  
  1.2       +3 -3      
jakarta-turbine-flux/src/templates/screens/permission/FluxPermissionList.vm
  
  Index: FluxPermissionList.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/permission/FluxPermissionList.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxPermissionList.vm     2001/03/26 00:49:38     1.1
  +++ FluxPermissionList.vm     2001/05/22 14:51:50     1.2
  @@ -1,7 +1,7 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxPermissionList.vm,v 1.1 2001/03/26 00:49:38 jvanzyl Exp $
  +@version $Id: FluxPermissionList.vm,v 1.2 2001/05/22 14:51:50 jvanzyl Exp $
   
   *#
   
  @@ -20,7 +20,7 @@
           <tr>
           <form method="post" action="">
             <td align="left">
  -            #listBox ($fieldList)
  +            #listBox ($flux.FieldList)
             </td>
             <td align="right">
               #textField("searchField" "*" "20")
  @@ -46,7 +46,7 @@
             #end
           </tr>
           
  -        #foreach ($permission in $permissions)
  +        #foreach ($permission in $flux.Permissions)
           <tr>
             #entryCell ($permission.Name)
             <td>
  
  
  
  1.2       +6 -4      jakarta-turbine-flux/src/templates/screens/role/FluxRoleForm.vm
  
  Index: FluxRoleForm.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/templates/screens/role/FluxRoleForm.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxRoleForm.vm   2001/03/26 00:49:39     1.1
  +++ FluxRoleForm.vm   2001/05/22 14:52:23     1.2
  @@ -4,7 +4,7 @@
   a role.
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxRoleForm.vm,v 1.1 2001/03/26 00:49:39 jvanzyl Exp $
  +@version $Id: FluxRoleForm.vm,v 1.2 2001/05/22 14:52:23 jvanzyl Exp $
   
   *#
   
  @@ -33,7 +33,7 @@
         #end
         
         <tr>
  -        #formCell ("Role Name" "name" $!role.Name)
  +        #formCell ("Role Name" "name" $!flux.Role.Name)
         </tr>
   
         <tr>
  @@ -45,9 +45,9 @@
   
             <font face="$ui.sansSerifFonts">
   
  -          #if ($mode == "modify")
  +          #if ($flux.Mode == "modify")
               <input type="submit" name="eventSubmit_doUpdate" value="Update Role"/>
  -          #elseif ($mode == "delete")
  +          #elseif ($flux.Mode == "delete")
               <input type="submit" name="eventSubmit_doDelete" value="Confirm 
Deletion"/>
             #else
               <input type="submit" name="eventSubmit_doInsert" value="Add Role"/>
  @@ -58,7 +58,9 @@
         </tr>
       </table>
     </div>
  +<!-- why is this here? !FIXME!
     <input type="hidden" name="userid" value="$!user.UserId"/>
  +-->
   </form>
   
   #if ($showEmbeddedMenu)
  
  
  
  1.2       +4 -3      jakarta-turbine-flux/src/templates/screens/role/FluxRoleList.vm
  
  Index: FluxRoleList.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/templates/screens/role/FluxRoleList.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxRoleList.vm   2001/03/26 00:49:39     1.1
  +++ FluxRoleList.vm   2001/05/22 14:52:31     1.2
  @@ -4,7 +4,7 @@
   the application.
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxRoleList.vm,v 1.1 2001/03/26 00:49:39 jvanzyl Exp $
  +@version $Id: FluxRoleList.vm,v 1.2 2001/05/22 14:52:31 jvanzyl Exp $
   
   *#
   
  @@ -22,7 +22,7 @@
           <tr>
           <form method="post" action="">
             <td align="left">
  -            #listBox ($fieldList)
  +            #listBox ($flux.FieldList)
             </td>
             <td align="right">
               #textField("searchField" "*" "20")
  @@ -48,7 +48,7 @@
             #end
           </tr>
           
  -        #foreach ($role in $roles)
  +        #foreach ($role in $flux.Roles)
           <tr>
             #entryCell ($role.Name)
             <td>
  @@ -60,6 +60,7 @@
             </td>
           </tr>
           #end
  +
         </table>
       </td>
     </tr>
  
  
  
  1.2       +4 -3      
jakarta-turbine-flux/src/templates/screens/role/FluxRolePermissionForm.vm
  
  Index: FluxRolePermissionForm.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/role/FluxRolePermissionForm.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxRolePermissionForm.vm 2001/03/26 00:49:39     1.1
  +++ FluxRolePermissionForm.vm 2001/05/22 14:52:34     1.2
  @@ -4,10 +4,11 @@
   for a role.
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxRolePermissionForm.vm,v 1.1 2001/03/26 00:49:39 jvanzyl Exp $
  +@version $Id: FluxRolePermissionForm.vm,v 1.2 2001/05/22 14:52:34 jvanzyl Exp $
   
   *#
   
  +#set ($role = $flux.Role)
   $page.setTitle("User Administration")
   $page.setBgColor($ui.bgcolor)
   
  @@ -21,7 +22,7 @@
     
     <form method="post" 
action="$link.setAction("role.FluxRoleAction").setPage("role,FluxRoleList.vm")">
       
  -  #foreach ($permission in $permissions)
  +  #foreach ($permission in $flux.Permissions)
     <tr>
       <td bgcolor="$ui.labelColor">
         <font face="$ui.sansSerifFonts">
  @@ -29,7 +30,7 @@
         </font>
       </td>
   
  -    #if ($rolePermissions.contains($permission))
  +    #if ($role.Permissions.contains($permission))
         #set ($checked = "checked")
       #else
         #set ($checked = "")
  
  
  
  1.3       +6 -4      jakarta-turbine-flux/src/templates/screens/user/FluxUserForm.vm
  
  Index: FluxUserForm.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/templates/screens/user/FluxUserForm.vm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FluxUserForm.vm   2001/03/29 00:39:03     1.2
  +++ FluxUserForm.vm   2001/05/22 14:53:01     1.3
  @@ -3,7 +3,7 @@
   Display the details of a user.
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxUserForm.vm,v 1.2 2001/03/29 00:39:03 jvanzyl Exp $
  +@version $Id: FluxUserForm.vm,v 1.3 2001/05/22 14:53:01 jvanzyl Exp $
   
   *#
   
  @@ -31,6 +31,7 @@
         </tr>
         #end
   
  +#set ( $user = $flux.User )
         <tr>
           #formCell ("Username" "username" $!user.UserName)
         </tr>
  @@ -59,9 +60,9 @@
               
             <font face="$ui.sansSerifFonts">
   
  -          #if ($mode == "modify")
  +          #if ($flux.Mode == "modify")
               <input type="submit" name="eventSubmit_doUpdate" value="Update User"/>
  -          #elseif ($mode == "delete")
  +          #elseif ($flux.Mode == "delete")
               <input type="submit" name="eventSubmit_doDelete" value="Confirm 
Deletion"/>
             #else
               <input type="submit" name="eventSubmit_doInsert" value="Add User"/>
  @@ -76,7 +77,8 @@
       <hr size="1" noshade>
       #parse ("screens/FluxEmbeddedMenu.vm")
     #end
  -
  +<!-- this gives an error !FIXME!
     <input type="hidden" name="userid" value="$!user.UserId"/>
  +-->
   </div>
   </form>
  
  
  
  1.2       +3 -3      jakarta-turbine-flux/src/templates/screens/user/FluxUserList.vm
  
  Index: FluxUserList.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/templates/screens/user/FluxUserList.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxUserList.vm   2001/03/26 00:49:39     1.1
  +++ FluxUserList.vm   2001/05/22 14:53:08     1.2
  @@ -1,7 +1,7 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxUserList.vm,v 1.1 2001/03/26 00:49:39 jvanzyl Exp $
  +@version $Id: FluxUserList.vm,v 1.2 2001/05/22 14:53:08 jvanzyl Exp $
   
   *#
   
  @@ -19,7 +19,7 @@
           <tr>
           <form action="$link.setPage("user,FluxUserList.vm")">
             <td align="left">
  -            #listBox ($fieldList)
  +            #listBox ($flux.FieldList)
             </td>
             <td align="right">
               #textField("searchField" "*" "20")
  @@ -45,7 +45,7 @@
             #end
           </tr>
   
  -        #foreach ($user in $users)
  +        #foreach ($user in $flux.Users)
           <tr>
             #entryCell ($!user.UserName)
             #entryCell ($!user.Password)
  
  
  
  1.2       +8 -5      
jakarta-turbine-flux/src/templates/screens/user/FluxUserRoleForm.vm
  
  Index: FluxUserRoleForm.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-flux/src/templates/screens/user/FluxUserRoleForm.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxUserRoleForm.vm       2001/03/26 00:49:39     1.1
  +++ FluxUserRoleForm.vm       2001/05/22 14:53:13     1.2
  @@ -1,13 +1,16 @@
   #**
   
   @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  -@version $Id: FluxUserRoleForm.vm,v 1.1 2001/03/26 00:49:39 jvanzyl Exp $
  +@version $Id: FluxUserRoleForm.vm,v 1.2 2001/05/22 14:53:13 jvanzyl Exp $
   
   *#
   
   $page.setTitle("User Administration")
   $page.setBgColor($ui.bgcolor)
   
  +#set ($user = $flux.User)
  +#set ($acl = $flux.ACL)
  +
   <font face="$ui.sansSerifFonts">
   
   Roles for $user.FirstName $user.LastName
  @@ -20,7 +23,7 @@
           &nbsp;
       </td>
         
  -    #foreach ($role in $roles)
  +    #foreach ($role in $flux.Roles)
       <td bgcolor="$ui.labelColor">
         <font face="$ui.sansSerifFonts">
           <b>$role.Name</b>
  @@ -32,7 +35,7 @@
   
     <form method="post" 
action="$link.setAction("user.FluxUserAction").setPage("user,FluxUserList.vm")">
   
  -  #foreach ($group in $groups)
  +  #foreach ($group in $flux.Groups)
     <tr>
       <td bgcolor="$ui.labelColor">
         <font face="$ui.sansSerifFonts">
  @@ -40,7 +43,7 @@
         </font>
       </td>
   
  -    #foreach ($role in $roles)
  +    #foreach ($role in $flux.Roles)
       #if ($acl.hasRole($role, $group))
         #set ($checked = "checked")
       #else
  @@ -49,7 +52,7 @@
       
       <td align="center" bgcolor="$ui.dataColor">
         <input type="checkbox" name="${group.Name}${role.Name}" $checked>
  -      <input type="hidden" name="username" value="$user.UserName">
  +      <input type="hidden" name="username" value="$flux.User.UserName">
       </td>
       #end
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to