geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r526613 - in /geronimo/server/trunk/modules: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-security/src/main/java/org/apache/geronimo/security/jacc/
Date Sun, 08 Apr 2007 23:15:30 GMT
Author: djencks
Date: Sun Apr  8 16:15:29 2007
New Revision: 526613

URL: http://svn.apache.org/viewvc?view=rev&rev=526613
Log:
GERONIMO-3073 Make 'businiess home/localhome' methods unchecked (they are never called directly

Modified:
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
    geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/ComponentPermissions.java

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?view=diff&rev=526613&r1=526612&r2=526613
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Sun Apr  8 16:15:29 2007
@@ -62,7 +62,6 @@
 import org.apache.openejb.jee.RemoteBean;
 import org.apache.openejb.jee.SecurityIdentity;
 import org.apache.openejb.jee.SessionBean;
-import org.apache.openejb.jee.StatelessBean;
 import org.apache.openejb.jee.SessionType;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.xbean.finder.ClassFinder;
@@ -218,7 +217,7 @@
                             EjbInterface.REMOTE.getJaccInterfaceName(),
                             remoteBean.getBusinessRemote(),
                             ejbModule.getClassLoader());
-                    securityBuilder.addToPermissions(permissions,
+                    securityBuilder.addToPermissions(componentPermissions.getUncheckedPermissions(),
                             remoteBean.getEjbName(),
                             EjbInterface.HOME.getJaccInterfaceName(),
                             DeploymentInfo.BusinessRemoteHome.class.getName(),
@@ -230,7 +229,7 @@
                             EjbInterface.LOCAL.getJaccInterfaceName(),
                             remoteBean.getBusinessLocal(),
                             ejbModule.getClassLoader());
-                    securityBuilder.addToPermissions(permissions,
+                    securityBuilder.addToPermissions(componentPermissions.getUncheckedPermissions(),
                             remoteBean.getEjbName(),
                             EjbInterface.LOCAL_HOME.getJaccInterfaceName(),
                             DeploymentInfo.BusinessLocalHome.class.getName(),

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java?view=diff&rev=526613&r1=526612&r2=526613
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/SecurityBuilder.java
Sun Apr  8 16:15:29 2007
@@ -61,7 +61,7 @@
 
         PermissionCollection uncheckedPermissions = componentPermissions.getUncheckedPermissions();
         PermissionCollection excludedPermissions = componentPermissions.getExcludedPermissions();
-        Map rolePermissions = componentPermissions.getRolePermissions();
+        Map<String, PermissionCollection> rolePermissions = componentPermissions.getRolePermissions();
 
         //this can occur in an ear when one ejb module has security and one doesn't.  In
this case we still need
         //to make the non-secure one completely unchecked.
@@ -156,7 +156,7 @@
 
                 String roleLink = securityRoleRef.getRoleLink() == null? securityRoleRef.getRoleName():
securityRoleRef.getRoleLink();
 
-                PermissionCollection roleLinks = (PermissionCollection) rolePermissions.get(roleLink);
+                PermissionCollection roleLinks = rolePermissions.get(roleLink);
                 if (roleLinks == null) {
                     roleLinks = new Permissions();
                     rolePermissions.put(roleLink, roleLinks);
@@ -179,7 +179,7 @@
         if (defaultRole == null) {
             permissions = uncheckedPermissions;
         } else {
-            permissions = (PermissionCollection) rolePermissions.get(defaultRole);
+            permissions = rolePermissions.get(defaultRole);
             if (permissions == null) {
                 permissions = new Permissions();
                 rolePermissions.put(defaultRole, permissions);
@@ -211,7 +211,7 @@
      * @param classLoader the class loader to be used in obtaining the interface class
      * @throws org.apache.geronimo.common.DeploymentException in case a class could not be
found
      */
-    public void addToPermissions(Permissions permissions,
+    public void addToPermissions(PermissionCollection permissions,
             String ejbName,
             String methodInterface,
             String interfaceClass,
@@ -240,7 +240,7 @@
      * @param permission the permission that is to be used for culling
      * @return the culled set of permissions that are not implied by <code>permission</code>
      */
-    private Permissions cullPermissions(Permissions toBeChecked, Permission permission) {
+    private Permissions cullPermissions(PermissionCollection toBeChecked, Permission permission)
{
         Permissions result = new Permissions();
 
         for (Enumeration e = toBeChecked.elements(); e.hasMoreElements();) {

Modified: geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/ComponentPermissions.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/ComponentPermissions.java?view=diff&rev=526613&r1=526612&r2=526613
==============================================================================
--- geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/ComponentPermissions.java
(original)
+++ geronimo/server/trunk/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jacc/ComponentPermissions.java
Sun Apr  8 16:15:29 2007
@@ -26,9 +26,9 @@
 public class ComponentPermissions implements Serializable {
     private final PermissionCollection excludedPermissions ;
     private final PermissionCollection uncheckedPermissions;
-    private final Map rolePermissions;
+    private final Map<String, PermissionCollection> rolePermissions;
 
-    public ComponentPermissions(PermissionCollection excludedPermissions, PermissionCollection
uncheckedPermissions, Map rolePermissions) {
+    public ComponentPermissions(PermissionCollection excludedPermissions, PermissionCollection
uncheckedPermissions, Map<String, PermissionCollection> rolePermissions) {
         this.excludedPermissions = excludedPermissions;
         this.uncheckedPermissions = uncheckedPermissions;
         this.rolePermissions = rolePermissions;
@@ -42,7 +42,7 @@
         return uncheckedPermissions;
     }
 
-    public Map getRolePermissions() {
+    public Map<String, PermissionCollection> getRolePermissions() {
         return rolePermissions;
     }
 }



Mime
View raw message