[jboss-cvs] JBossAS SVN: r71564 - projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 1 13:58:10 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-01 13:58:10 -0400 (Tue, 01 Apr 2008)
New Revision: 71564
Modified:
projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/BasicEvaluationCtx.java
Log:
SECURITY-162: go easy on the resource id requirement
Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/BasicEvaluationCtx.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/BasicEvaluationCtx.java 2008-04-01 17:57:29 UTC (rev 71563)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/BasicEvaluationCtx.java 2008-04-01 17:58:10 UTC (rev 71564)
@@ -273,10 +273,10 @@
mapAttributes(resource, resourceMap);
// make sure there resource-id attribute was included
- if (! resourceMap.containsKey(RESOURCE_ID)) {
+ if (! resourceMap.containsKey(RESOURCE_ID)) {
System.err.println("Resource must contain resource-id attr");
- throw new ParsingException("resource missing resource-id");
- } else {
+ //throw new ParsingException("resource missing resource-id");
+ } else {
// make sure there's only one value for this
Set set = (Set)(resourceMap.get(RESOURCE_ID));
if (set.size() > 1) {
@@ -287,8 +287,13 @@
// keep track of the resource-id attribute
resourceId = ((Attribute)(set.iterator().next())).getValue();
}
- }
-
+
+ }
+
+ //SECURITY-162: Relax resource-id requirement
+ if(this.resourceId == null)
+ this.resourceId = new StringAttribute("");
+
// see if a resource-scope attribute was included
if (resourceMap.containsKey(RESOURCE_SCOPE)) {
Set set = (Set)(resourceMap.get(RESOURCE_SCOPE));
More information about the jboss-cvs-commits
mailing list