geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r474830 - in /geronimo/server/trunk/applications/console/geronimo-console-standard/src/main: java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java webapp/WEB-INF/view/realmwizard/edit.jsp
Date Tue, 14 Nov 2006 15:55:55 GMT
Author: vamsic007
Date: Tue Nov 14 07:55:53 2006
New Revision: 474830

URL: http://svn.apache.org/viewvc?view=rev&rev=474830
Log:
GERONIMO-1704 Console security realm doesn't let you pick a JAR

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/edit.jsp

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java?view=diff&rev=474830&r1=474829&r2=474830
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
Tue Nov 14 07:55:53 2006
@@ -134,6 +134,7 @@
     private static final String USAGE_MODE = "usage";
     private static final String SAVE_MODE = "save";
     private static final String MODE_KEY = "mode";
+    private static final String CUSTOM_MODE = "custom";
 
     private static Kernel kernel;
 
@@ -185,7 +186,7 @@
             if (data.getName() != null && !data.getName().trim().equals("")) {
                 // Config properties have to be set in render since they have values of null
                 if (data.getRealmType().equals("Other")) {
-                    actionResponse.setRenderParameter(MODE_KEY, EDIT_MODE);
+                    actionResponse.setRenderParameter(MODE_KEY, CUSTOM_MODE);
                 } else {
                     actionResponse.setRenderParameter(MODE_KEY, CONFIGURE_MODE);
                 }
@@ -219,9 +220,10 @@
             actionLoadExistingRealm(actionRequest, data);
             actionResponse.setRenderParameter(MODE_KEY, EDIT_MODE);
         } else if (mode.equals(CONFIGURE_MODE)) {
-            if (data.getAbstractName() != null || (data.getRealmType() != null &&
data.getRealmType().equals("Other")))
-            {
+            if (data.getAbstractName() != null) {
                 actionResponse.setRenderParameter(MODE_KEY, EDIT_MODE);
+            } else if((data.getRealmType() != null && data.getRealmType().equals("Other")))
{
+                actionResponse.setRenderParameter(MODE_KEY, CUSTOM_MODE);
             } else {
                 actionResponse.setRenderParameter(MODE_KEY, CONFIGURE_MODE);
             }
@@ -249,6 +251,9 @@
             if (mode.equals(LIST_MODE)) {
                 renderList(renderRequest, renderResponse);
             } else if (mode.equals(EDIT_MODE)) {
+            } else if (mode.equals(EDIT_MODE) || mode.equals(CUSTOM_MODE)) {
+                renderRequest.setAttribute("mode", mode);
+                if(mode.equals(CUSTOM_MODE)) loadDriverJARList(renderRequest);
                 renderEdit(renderRequest, renderResponse, data);
             } else if (mode.equals(SELECT_TYPE_MODE)) {
                 renderSelectType(renderRequest, renderResponse);

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/edit.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/edit.jsp?view=diff&rev=474830&r1=474829&r2=474830
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/edit.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/realmwizard/edit.jsp
Tue Nov 14 07:55:53 2006
@@ -18,7 +18,6 @@
 <!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
 <form name="<portlet:namespace/>RealmForm" action="<portlet:actionURL/>">
     <input type="hidden" name="mode" value="save" />
-    <input type="hidden" name="jar" value="${realm.jar}" />
     <input type="hidden" name="name" value="${realm.name}" />
     <input type="hidden" name="realmType" value="${realm.realmType}" />
   <c:forEach var="option" items="${realm.options}">
@@ -53,6 +52,31 @@
         <td>A name that is different than the name for any other security realms in
the server (no spaces in the name please).
           Other components will use this name to refer to the security realm.</td>
       </tr>
+    <!-- ENTRY FIELD: LoginModule JAR -->
+    <c:choose>
+      <c:when test="${mode eq 'custom'}">
+      <tr>
+        <th><div align="right">Login Module JAR:</div></th>
+        <td>
+          <select name="jar">
+                  <option />
+              <c:forEach var="availableJar" items="${jars}">
+                  <option <c:if test="${availableJar == realm.jar}">selected</c:if>>
+                      ${availableJar}
+                  </option>
+              </c:forEach>
+          </select>
+        </td>
+      </tr>
+      <tr>
+        <td></td>
+        <td>The jar containing Login Module and Principal classes.</td>
+      </tr>
+      </c:when>
+      <c:otherwise>
+        <input type="hidden" name="jar" value="${realm.jar}" />
+      </c:otherwise>
+    </c:choose>
     <!-- HEADER -->
     <c:forEach var="module" items="${realm.modules}" varStatus="status" >
       <tr>



Mime
View raw message