You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/11/08 15:35:44 UTC
svn commit: r331827 - in /directory/shared/ldap/trunk/common/src:
antlr/ACIItem.g test/org/apache/ldap/common/aci/ACIItemParserTest.java
Author: ersiner
Date: Tue Nov 8 06:35:17 2005
New Revision: 331827
URL: http://svn.apache.org/viewcvs?rev=331827&view=rev
Log:
Fix for DIRLDAP-69.
Prevented ACIItemParser from accepting subtreeSpecifications with specificationFilters.
Modified:
directory/shared/ldap/trunk/common/src/antlr/ACIItem.g
directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/aci/ACIItemParserTest.java
Modified: directory/shared/ldap/trunk/common/src/antlr/ACIItem.g
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/antlr/ACIItem.g?rev=331827&r1=331826&r2=331827&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/antlr/ACIItem.g (original)
+++ directory/shared/ldap/trunk/common/src/antlr/ACIItem.g Tue Nov 8 06:35:17 2005
@@ -1032,7 +1032,7 @@
chopBeforeExclusions = new HashSet();
chopAfterExclusions = new HashSet();
subtreeSpecificationComponentsMonitor = new OptionalComponentsMonitor(
- new String [] { "base", "specificExclusions", "minimum", "maximum", "specificationFilter" } );
+ new String [] { "base", "specificExclusions", "minimum", "maximum" } );
}
:
OPEN_CURLY ( SP )*
@@ -1065,10 +1065,6 @@
{
subtreeSpecificationComponentsMonitor.useComponent( "maximum" );
}
- | ss_specificationFilter
- {
- subtreeSpecificationComponentsMonitor.useComponent( "specificationFilter" );
- }
;
exception
catch [IllegalArgumentException e]
@@ -1165,18 +1161,6 @@
ID_maximum ( SP )+ maximum=baseDistance
{
ssModifier.setMaxBaseDistance( maximum );
- }
- ;
-
-ss_specificationFilter
-{
- log.debug( "entered ss_specificationFilter()" );
- ExprNode theRefinement = null;
-}
- :
- ID_specificationFilter ( SP )+ theRefinement=refinement
- {
- ssModifier.setRefinement( theRefinement );
}
;
Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/aci/ACIItemParserTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/aci/ACIItemParserTest.java?rev=331827&r1=331826&r2=331827&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/aci/ACIItemParserTest.java (original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/aci/ACIItemParserTest.java Tue Nov 8 06:35:17 2005
@@ -85,7 +85,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } } } ";
@@ -140,7 +140,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { name { \"ou=people,cn=ersin\" }, allUsers, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } } } ";
@@ -174,7 +174,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { name { \"ou=people,cn=ersin\" }, allUsers, allUsers, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } } } ";
@@ -231,7 +231,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { grantsAndDenials { grantBrowse }, protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } } } } } ";
@@ -243,7 +243,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { grantsAndDenials { grantBrowse }, grantsAndDenials { grantBrowse }, protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } } } } } ";
@@ -262,7 +262,7 @@
public void testOrderOfMainACIComponentsDoesNotMatter() throws Exception
{
String spec = "{ itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } }, " +
@@ -274,7 +274,7 @@
public void testOrderOfMainACIComponentsDoesNotMatterButDuplicatesMatter() throws Exception
{
String spec = "{ itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } }, " +
@@ -294,7 +294,7 @@
public void testOrderOfMainACIComponentsDoesNotMatterButMissingsMatter() throws Exception
{
String spec = "{ itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } } }, " +
@@ -316,7 +316,7 @@
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } }, userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } } } ";
parser.parse( spec );
@@ -357,7 +357,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\"}, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , " +
"maxValueCount { { type 10.11.12, maxCount 10 }, { maxCount 20, type 11.12.13 } } " +
@@ -370,7 +370,7 @@
{
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ base \"ou=system\", specificationFilter and:{ } }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
"minimum 1, maximum 2 } } } , " +
"userPermissions { { protectedItems{ entry , " +
"restrictedBy { { type 10.11.12, valuesIn ou }, { valuesIn cn, type 11.12.13 } } " +
@@ -384,7 +384,7 @@
String spec = "{ identificationTag \"id2\" , precedence 14, authenticationLevel none , " +
"itemOrUserFirst userFirst: { userPermissions { { protectedItems{ entry , attributeType { cn , ou } , attributeValue {x=y,m=n,k=l} , " +
"rangeOfValues (cn=ErsinEr) } , grantsAndDenials { grantBrowse } } }, userClasses { allUsers , name { \"ou=people,cn=ersin\" }, " +
- "subtree {{ specificationFilter and:{ }, base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
+ "subtree {{ minimum 7, maximum 9, base \"ou=system\" }, { base \"ou=ORGANIZATIONUNIT\"," +
" maximum 2, minimum 1 } } } } } ";
parser.parse( spec );