directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r957878 - in /directory/shared/trunk/ldap/src: main/antlr/ main/java/org/apache/directory/shared/ldap/aci/ test/java/org/apache/directory/shared/ldap/aci/ test/java/org/apache/directory/shared/ldap/schema/syntax/
Date Fri, 25 Jun 2010 10:21:38 GMT
Author: elecharny
Date: Fri Jun 25 10:21:37 2010
New Revision: 957878

URL: http://svn.apache.org/viewvc?rev=957878&view=rev
Log:
Unrelaxed the ACIItem grammar accordingly to DIRSERVER-1522. More to come.

Modified:
    directory/shared/trunk/ldap/src/main/antlr/ACIItem.g
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/ACIItemSyntaxCheckerTest.java

Modified: directory/shared/trunk/ldap/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/antlr/ACIItem.g?rev=957878&r1=957877&r2=957878&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/antlr/ACIItem.g (original)
+++ directory/shared/trunk/ldap/src/main/antlr/ACIItem.g Fri Jun 25 10:21:37 2010
@@ -348,13 +348,7 @@ itemFirst
     :
     ID_itemFirst ( SP )* COLON ( SP )*
         OPEN_CURLY ( SP )*
-            ( 
-              protectedItems ( SP )*
-                SEP ( SP )* itemPermissions
-            | // relaxing
-              itemPermissions ( SP )*
-                SEP ( SP )* protectedItems
-            )
+          protectedItems ( SP )* SEP ( SP )* itemPermissions
         ( SP )* CLOSE_CURLY
     {
         isItemFirstACIItem = true;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java?rev=957878&r1=957877&r2=957878&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ItemFirstACIItem.java
Fri Jun 25 10:21:37 2010
@@ -36,8 +36,7 @@ import org.apache.directory.shared.ldap.
  */
 public class ItemFirstACIItem extends ACIItem
 {
-    private static final long serialVersionUID = -8199453391060356463L;
-
+    /** The list of protected items ( userClasses or userPermissions ) */
     private final Collection<ProtectedItem> protectedItems;
 
     private final Collection<ItemPermission> itemPermissions;

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java?rev=957878&r1=957877&r2=957878&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
Fri Jun 25 10:21:37 2010
@@ -201,21 +201,6 @@ public class ACIItemChekerTest
 
 
     @Test
-    public void testItemFirstComponentsOrderDoesNotMatter() throws Exception
-    {
-        String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
-            + "itemOrUserFirst itemFirst  :{ itemPermissions { { userClasses {allUsers  ,
userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\" } "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } },"
-            + "{ precedence 10, userClasses {allUsers  , userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\"
} "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } } },protectedItems  { entry  , attributeType { 1.2.3    , ou }  , "
-            + " attributeValue { ou=people  , cn=Ersin  }  , rangeOfValues (cn=ErsinEr) ,
"
-            + "classes and : { item: xyz , or:{item:X,item:Y}   }}  " + " }}";
-
-        checker.parse( spec );
-    }
-
-
-    @Test
     public void testRestrictedValueComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java?rev=957878&r1=957877&r2=957878&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
Fri Jun 25 10:21:37 2010
@@ -21,6 +21,10 @@
 package org.apache.directory.shared.ldap.aci;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
 import java.text.ParseException;
 
 import org.apache.directory.junit.tools.Concurrent;
@@ -28,10 +32,6 @@ import org.apache.directory.junit.tools.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertEquals;
-
 /**
  * Unit tests class for ACIItem parser (wrapper).
  * 
@@ -381,22 +381,6 @@ public class ACIItemParserTest
 
 
     @Test 
-    public void testItemFirstComponentsOrderDoesNotMatter() throws Exception
-    {
-        String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
-            + "itemOrUserFirst itemFirst  :{ itemPermissions { { userClasses {allUsers  ,
userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\" } "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } },"
-            + "{ precedence 10, userClasses {allUsers  , userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\"
} "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } } },protectedItems  { entry  , attributeType { 1.2.3    , ou }  , "
-            + " attributeValue { ou=people  , cn=Ersin  }  , rangeOfValues (cn=ErsinEr) ,
"
-            + "classes and : { item: xyz , or:{item:X,item:Y}   }}  " + " }}";
-
-        ACIItem item = parser.parse( spec );
-        checkItemToString( spec, item );
-    }
-
-
-    @Test 
     public void testGrantAndDenialBitsOrderDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/ACIItemSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/ACIItemSyntaxCheckerTest.java?rev=957878&r1=957877&r2=957878&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/ACIItemSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/ACIItemSyntaxCheckerTest.java
Fri Jun 25 10:21:37 2010
@@ -212,21 +212,6 @@ public class ACIItemSyntaxCheckerTest
 
 
     @Test
-    public void testItemFirstComponentsOrderDoesNotMatter()
-    {
-        String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
-            + "itemOrUserFirst itemFirst  :{ itemPermissions { { userClasses {allUsers  ,
userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\" } "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } },"
-            + "{ precedence 10, userClasses {allUsers  , userGroup { \"1.2=y,z=t\"  , \"a=b,c=d\"
} "
-            + " , subtree { { base \"ou=people\" } } }   , grantsAndDenials  {  denyCompare
 , grantModify } } },protectedItems  { entry  , attributeType { 1.2.3    , ou }  , "
-            + " attributeValue { ou=people  , cn=Ersin  }  , rangeOfValues (cn=ErsinEr) ,
"
-            + "classes and : { item: xyz , or:{item:X,item:Y}   }}  " + " }}";
-
-        assertTrue( checker.isValidSyntax( spec ) );
-    }
-
-
-    @Test
     public void testRestrictedValueComponentsOrderDoesNotMatter()
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "



Mime
View raw message