tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin TomcatTreeBuilder.java
Date Tue, 23 Sep 2003 19:29:36 GMT
amyroh      2003/09/23 12:29:36

  Modified:    webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        TomcatTreeBuilder.java
  Log:
  Fix to not display JAASRealm node since admin doesn't support editing such Realm - bugtraq
4926142.
  
  Revision  Changes    Path
  1.8       +14 -9     jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
  
  Index: TomcatTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TomcatTreeBuilder.java	24 Apr 2003 07:56:33 -0000	1.7
  +++ TomcatTreeBuilder.java	23 Sep 2003 19:29:36 -0000	1.8
  @@ -72,6 +72,8 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
  +import org.apache.commons.modeler.ManagedBean;
  +import org.apache.commons.modeler.Registry;
   import org.apache.struts.action.Action;
   import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
  @@ -434,10 +436,12 @@
               Lists.getRealms(mBServer, containerName).iterator();
           while (realmNames.hasNext()) {
               String realmName = (String) realmNames.next();
  -            ObjectName objectName = new ObjectName(realmName);
  -            String nodeLabel = "Realm for " + containerNode.getLabel();
  -            TreeControlNode realmNode =
  -                new TreeControlNode(realmName,
  +	    ManagedBean mb = Registry.getRegistry().findManagedBean(realmName);
  +	    if (mb!=null && !mb.getName().equals("JAASRealm")) {
  +	        ObjectName objectName = new ObjectName(realmName);
  +	        String nodeLabel = "Realm for " + containerNode.getLabel();
  +	        TreeControlNode realmNode =
  +		    new TreeControlNode(realmName,
                                       "Realm.gif",
                                       nodeLabel,
                                       "EditRealm.do?select=" +
  @@ -446,7 +450,8 @@
                                       URLEncoder.encode(nodeLabel),
                                       "content",
                                       false, domain);
  -            containerNode.addChild(realmNode);
  +                containerNode.addChild(realmNode);
  +	    }
           }
           
       }   
  
  
  

Mime
View raw message