tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r526843 - /incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java
Date Mon, 09 Apr 2007 17:19:27 GMT
Author: dblevins
Date: Mon Apr  9 10:19:26 2007
New Revision: 526843

URL: http://svn.apache.org/viewvc?view=rev&rev=526843
Log:
No need to translate from role ref name to role name

Modified:
    incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java?view=diff&rev=526843&r1=526842&r2=526843
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java
(original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/SecurityServiceImpl.java
Mon Apr  9 10:19:26 2007
@@ -216,11 +216,7 @@
         try {
             CoreDeploymentInfo deployment = threadContext.getDeploymentInfo();
 
-            String securityRole = deployment.getSecurityRole(role);
-            if (securityRole == null) {
-                throw new IllegalArgumentException("Cannot do an isCallerInRole check using
an role name not declared via <security-role-ref> or @DeclareRoles: role="+role+", referenced-by="+deployment.getBeanClass().getName());
-            }
-            securityContext.acc.checkPermission(new EJBRoleRefPermission(deployment.getEjbName(),
securityRole));
+            securityContext.acc.checkPermission(new EJBRoleRefPermission(deployment.getEjbName(),
role));
         } catch (AccessControlException e) {
             return false;
         }



Mime
View raw message