taylor      2004/09/20 00:25:24

  Modified:    applications/pam/src/webapp/WEB-INF/view user-details.jsp
               applications/pam/src/java/org/apache/jetspeed/portlets/pam
                        PortletApplicationResources.java
               
applications/pam/src/java/org/apache/jetspeed/portlets/security/resources
                        SecurityResources_en.properties
                        SecurityResources.properties
               applications/pam/src/java/org/apache/jetspeed/portlets/security
                        UserDetailsPortlet.java
               applications/pam/src/webapp/WEB-INF jetspeed-portlet.xml
  Log:
  profiling rule ui
  (not completed, need to use a dropdown list or radio buttons)
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.6       +28 -3     
jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/user-details.jsp
  
  Index: user-details.jsp
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/view/user-details.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- user-details.jsp  20 Sep 2004 06:08:59 -0000      1.5
  +++ user-details.jsp  20 Sep 2004 07:25:23 -0000      1.6
  @@ -162,7 +162,7 @@
   <%--Beginning Security Group tab data--%>
   <%--TODO:  switch to c:choose --%>
   <c:if test="${selectedTab.id == 'user_group'}">
  -  <div id="Role">
  +  <div id="Group">
     <portlet:actionURL var="edit_group_link" />
     
        <form name="Edit_Group_Form" action="<c:out value="${edit_group_link}"/>">
  @@ -210,9 +210,34 @@
   <%--TODO:  switch to c:choose --%>
   <c:if test="${selectedTab.id == 'user_profile'}">
     <div id="Profile">
  -  </div>
  -  <h3>USER PROFILE</h3>
  +  <portlet:actionURL var="edit_group_link" />
     
  +     <form name="Edit_Group_Form" action="<c:out value="${edit_group_link}"/>">
  +             <input type="hidden" name="portlet_action" 
value="security_user.edit_group"/>           
  +             <table>
  +                     <tr>
  +                             <th>&nbsp;</th>
  +                             <th><fmt:message key="security.profile.rules"/></th>
  +                             <th>&nbsp;</th>
  +                     </tr>
  +             <c:forEach var="rule" items="${rules}">
  +                     <tr>                    
  +                             <td>
  +                                     <input type="checkbox" name="user_rule_id" 
value="<c:out value="${rule.id}"/>"/>
  +                                     
  +                             </td>
  +                             <td>
  +                                     <c:out value="${rule.id}"/>
  +                             </td>
  +                             <td>
  +                                     <c:out value="${rule.title}"/>
  +                             </td>                           
  +                     </tr>
  +             </c:forEach>
  +             </table>
  +    </form>
  +
  +  </div>
   </c:if>
   <%--End of Profile tab data--%>
   
  
  
  
  1.10      +2 -1      
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/pam/PortletApplicationResources.java
  
  Index: PortletApplicationResources.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/pam/PortletApplicationResources.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PortletApplicationResources.java  20 Sep 2004 06:08:38 -0000      1.9
  +++ PortletApplicationResources.java  20 Sep 2004 07:25:23 -0000      1.10
  @@ -37,6 +37,7 @@
       public final static String CPS_PAGE_MANAGER_COMPONENT = "cps:PageManager";
       public final static String CPS_ROLE_MANAGER_COMPONENT = "cps:RoleManager";
       public final static String CPS_GROUP_MANAGER_COMPONENT = "cps:GroupManager";
  +    public final static String CPS_PROFILER_COMPONENT = "cps:Profiler";
       public final static String CURRENT_FOLDER = "current_folder";
       public final static String CURRENT_PAGE = "current_page";
       public final static String CURRENT_USER = "current_user";
  
  
  
  1.5       +2 -1      
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/resources/SecurityResources_en.properties
  
  Index: SecurityResources_en.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/resources/SecurityResources_en.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SecurityResources_en.properties   20 Sep 2004 06:08:38 -0000      1.4
  +++ SecurityResources_en.properties   20 Sep 2004 07:25:23 -0000      1.5
  @@ -23,6 +23,7 @@
   security.add=Add
   security.rolename=Role Name
   security.groupname=Group Name
  +security.profile.rules=Profile Rules
   
   ## User Information Tabs
   pam.details.tabs.user_attributes=Attributes
  
  
  
  1.6       +2 -1      
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/resources/SecurityResources.properties
  
  Index: SecurityResources.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/resources/SecurityResources.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SecurityResources.properties      20 Sep 2004 06:08:38 -0000      1.5
  +++ SecurityResources.properties      20 Sep 2004 07:25:23 -0000      1.6
  @@ -23,6 +23,7 @@
   security.add=Add
   security.rolename=Role Name
   security.groupname=Group Name
  +security.profile.rules=Profile Rules
   
   ## User Information Tabs
   pam.details.tabs.user_attributes=Attributes
  
  
  
  1.6       +16 -2     
jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/UserDetailsPortlet.java
  
  Index: UserDetailsPortlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/java/org/apache/jetspeed/portlets/security/UserDetailsPortlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UserDetailsPortlet.java   20 Sep 2004 06:08:38 -0000      1.5
  +++ UserDetailsPortlet.java   20 Sep 2004 07:25:23 -0000      1.6
  @@ -36,6 +36,7 @@
   import org.apache.jetspeed.portlets.pam.beans.TabBean;
   import org.apache.jetspeed.portlets.security.users.JetspeedUserBean;
   import org.apache.jetspeed.portlets.security.users.JetspeedUserBean.StringAttribute;
  +import org.apache.jetspeed.profiler.Profiler;
   import org.apache.jetspeed.security.GroupManager;
   import org.apache.jetspeed.security.RoleManager;
   import org.apache.jetspeed.security.User;
  @@ -55,6 +56,7 @@
       private final String VIEW_USER = "user"; 
       private final String VIEW_ROLES = "roles";
       private final String VIEW_GROUPS = "groups";
  +    private final String VIEW_RULES = "rules";
       
       private final String USER_ACTION_PREFIX = "security_user.";
       private final String ACTION_UPDATE_ATTRIBUTE = "update_user_attribute";
  @@ -64,6 +66,7 @@
       private final String ACTION_ADD_ROLE = "add_user_role";
       private final String ACTION_REMOVE_GROUP = "remove_user_group";
       private final String ACTION_ADD_GROUP = "add_user_group";
  +    private final String ACTION_UPDATE_RULE = "update_user_rule";
       
       private final String TAB_ATTRIBUTES = "user_attributes";
       private final String TAB_ROLE = "user_role";
  @@ -73,6 +76,7 @@
       private UserManager  userManager;
       private RoleManager  roleManager;
       private GroupManager groupManager;
  +    private Profiler     profiler;
   
       private LinkedHashMap userTabMap = new LinkedHashMap();
       
  @@ -95,6 +99,11 @@
           {
               throw new PortletException("Failed to find the Group Manager on portlet 
initialization");
           }
  +        profiler = 
(Profiler)getPortletContext().getAttribute(PortletApplicationResources.CPS_PROFILER_COMPONENT);
  +        if (null == profiler)
  +        {
  +            throw new PortletException("Failed to find the Profiler on portlet 
initialization");
  +        }
           
           TabBean tb1 = new TabBean(TAB_ATTRIBUTES);
           TabBean tb2 = new TabBean(TAB_ROLE);
  @@ -145,7 +154,7 @@
               }
               else if (selectedTab.getId().equals(TAB_PROFILE))
               {
  -                
  +                request.setAttribute(VIEW_RULES, getProfilerRules());               
   
               }
              
               request.setAttribute(PortletApplicationResources.REQUEST_SELECT_TAB, 
selectedTab);
  @@ -447,6 +456,11 @@
               System.err.println("user not found: " + userName + ", " + e);
           }    
           return user;
  +    }
  +    
  +    private Collection getProfilerRules()
  +    {
  +        return profiler.getRules();
       }
       
   }
  
  
  
  1.6       +1 -0      
jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/jetspeed-portlet.xml
  
  Index: jetspeed-portlet.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/applications/pam/src/webapp/WEB-INF/jetspeed-portlet.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jetspeed-portlet.xml      20 Sep 2004 06:08:59 -0000      1.5
  +++ jetspeed-portlet.xml      20 Sep 2004 07:25:24 -0000      1.6
  @@ -35,6 +35,7 @@
                <js:service name='PageManager'/>
                <js:service name='RoleManager'/>
                <js:service name='GroupManager'/>
  +             <js:service name='Profiler'/>
        </js:services>
        
   </portlet-app>
  
  
  

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

Reply via email to