directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r433166 - in /directory/branches/apacheds/1.0: core-unit/src/test/java/org/apache/directory/server/core/subtree/ core/src/main/java/org/apache/directory/server/core/subtree/
Date Mon, 21 Aug 2006 06:27:28 GMT
Author: akarasulu
Date: Sun Aug 20 23:27:27 2006
New Revision: 433166

URL: http://svn.apache.org/viewvc?rev=433166&view=rev
Log:
rolling back fix for DIRSERVER-708

Modified:
    directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
    directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
    directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java

Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java?rev=433166&r1=433165&r2=433166&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
(original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
Sun Aug 20 23:27:27 2006
@@ -147,6 +147,7 @@
     
     public void testTrackingOfSubentryOperationals() throws NamingException
     {
+        /*
         addAdministrativeRoles();        
         super.sysRoot.createSubcontext( "cn=collectiveAttributeTestSubentry", 
             getCollectiveAttributeTestSubentry( "collectiveAttributeTestSubentry" ) );
@@ -180,5 +181,6 @@
             accessControlSubentries.contains( "2.5.4.3=collectiveattributetestsubentry,2.5.4.11=system"
) );
         
         assertEquals( 1, accessControlSubentries.size() );
+        */
     }
 }

Modified: directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java?rev=433166&r1=433165&r2=433166&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
(original)
+++ directory/branches/apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
Sun Aug 20 23:27:27 2006
@@ -60,10 +60,6 @@
         Attribute objectClass = new LockableAttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
-//        objectClass.add( SubentryService.AUTONOUMOUS_AREA_SUBENTRY_OC );
-//        objectClass.add( SubentryService.COLLECTIVE_SUBENTRY_OC );
-//        objectClass.add( SubentryService.SCHEMA_SUBENTRY_OC );
-        objectClass.add( SubentryService.AC_SUBENTRY_OC );
         subentry.put( objectClass );
         subentry.put( "subtreeSpecification", "{ base \"ou=configuration\" }" );
         subentry.put( "cn", "testsubentry" );
@@ -77,10 +73,6 @@
         Attribute objectClass = new LockableAttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
-//        objectClass.add( SubentryService.AUTONOUMOUS_AREA_SUBENTRY_OC );
-//        objectClass.add( SubentryService.COLLECTIVE_SUBENTRY_OC );
-//        objectClass.add( SubentryService.SCHEMA_SUBENTRY_OC );
-        objectClass.add( SubentryService.AC_SUBENTRY_OC );
         subentry.put( objectClass );
         String spec = "{ base \"ou=configuration\", specificExclusions { chopBefore:\"cn=unmarked\"
} }";
         subentry.put( "subtreeSpecification", spec );

Modified: directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=433166&r1=433165&r2=433166&view=diff
==============================================================================
--- directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
(original)
+++ directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Sun Aug 20 23:27:27 2006
@@ -77,20 +77,16 @@
 
     public static final String AUTONOUMOUS_AREA = "autonomousArea";
     public static final String AUTONOUMOUS_AREA_SUBENTRY = "autonomousAreaSubentry";
-    public static final Object AUTONOUMOUS_AREA_SUBENTRY_OC = "autonomousAreaSubentry";
 
     public static final String AC_AREA = "accessControlSpecificArea";
     public static final String AC_INNERAREA = "accessControlInnerArea";
     public static final String AC_SUBENTRY = "accessControlSubentries";
-    public static final String AC_SUBENTRY_OC = "accessControlSubentry";
 
     public static final String SCHEMA_AREA = "subschemaAdminSpecificArea";
     public static final String SCHEMA_AREA_SUBENTRY = "subschemaSubentry";
-    public static final String SCHEMA_SUBENTRY_OC = "subschema";
 
     public static final String COLLECTIVE_AREA = "collectiveAttributeSpecificArea";
     public static final String COLLECTIVE_ATTRIBUTE_SUBENTRIES = "collectiveAttributeSubentries";
-    public static final String COLLECTIVE_SUBENTRY_OC = "collectiveAttributeSubentry";
 
     public static final String COLLECTIVE_INNERAREA = "collectiveAttributeInnerArea";
 
@@ -187,24 +183,24 @@
                 ResultCodeEnum.OBJECTCLASSVIOLATION );
         }
         
-        if ( oc.contains( AUTONOUMOUS_AREA_SUBENTRY_OC ) )
+        if ( oc.contains( AUTONOUMOUS_AREA ) )
         {
-            types |= Subentry.AUTONOMOUS_AREA_SUBENTRY;
+            types &= Subentry.AUTONOMOUS_AREA_SUBENTRY;
         }
         
-        if ( oc.contains( AC_SUBENTRY_OC ) )
+        if ( oc.contains( AC_AREA ) || oc.contains( AC_INNERAREA ) )
         {
-            types |= Subentry.ACCESS_CONTROL_SUBENTRY;
+            types &= Subentry.ACCESS_CONTROL_SUBENTRY;
         }
         
-        if ( oc.contains( SCHEMA_SUBENTRY_OC ) )
+        if ( oc.contains( SCHEMA_AREA ) )
         {
-            types |= Subentry.SCHEMA_SUBENTRY;
+            types &= Subentry.SCHEMA_SUBENTRY;
         }
         
-        if ( oc.contains( COLLECTIVE_SUBENTRY_OC ) )
+        if ( oc.contains( COLLECTIVE_AREA ) )
         {
-            types |= Subentry.COLLECTIVE_SUBENTRY;
+            types &= Subentry.COLLECTIVE_SUBENTRY;
         }
         
         return types;
@@ -470,8 +466,7 @@
                 LdapDN subentryDn = new LdapDN( subentryDnStr );
                 LdapDN apDn = ( LdapDN ) subentryDn.clone();
                 apDn.remove( apDn.size() - 1 );
-                Subentry subentry = subentryCache.getSubentry( subentryDn.toNormName() );
-                SubtreeSpecification ss = subentry.getSubtreeSpecification();
+                SubtreeSpecification ss = subentryCache.getSubentry( subentryDn.toNormName()
).getSubtreeSpecification();
 
                 if ( evaluator.evaluate( ss, apDn, normName, objectClasses ) )
                 {
@@ -490,11 +485,6 @@
                                 operational = new LockableAttributeImpl( AUTONOUMOUS_AREA_SUBENTRY
);
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isAutonomousAreaSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else if ( role.equalsIgnoreCase( AC_AREA ) || role.equalsIgnoreCase(
AC_INNERAREA ) )
                         {
@@ -504,11 +494,6 @@
                                 operational = new LockableAttributeImpl( AC_SUBENTRY );
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isAccessControlSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else if ( role.equalsIgnoreCase( SCHEMA_AREA ) )
                         {
@@ -518,11 +503,6 @@
                                 operational = new LockableAttributeImpl( SCHEMA_AREA_SUBENTRY
);
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isSchemaSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else if ( role.equalsIgnoreCase( COLLECTIVE_AREA )
                             || role.equalsIgnoreCase( COLLECTIVE_INNERAREA ) )
@@ -533,11 +513,6 @@
                                 operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES
);
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isCollectiveSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else
                         {
@@ -552,7 +527,7 @@
                                     + " collectiveAttributeInnerArea.", ResultCodeEnum.CONSTRAINTVIOLATION
);
                         }
 
-//                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.toString() );
                     }
                 }
             }



Mime
View raw message