directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r433172 - in /directory/trunks/apacheds: core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Date Mon, 21 Aug 2006 06:32:00 GMT
Author: akarasulu
Date: Sun Aug 20 23:32:00 2006
New Revision: 433172

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

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

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

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?rev=433172&r1=433171&r2=433172&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Sun Aug 20 23:32:00 2006
@@ -77,27 +77,22 @@
 
     public static final String AUTONOUMOUS_AREA = "autonomousArea";
     public static final String AUTONOUMOUS_AREA_SUBENTRY = "autonomousAreaSubentry";
-    private 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";
-    private static final String AC_SUBENTRY_OC = "accessControlSubentry";
 
     public static final String SCHEMA_AREA = "subschemaAdminSpecificArea";
     public static final String SCHEMA_AREA_SUBENTRY = "subschemaSubentry";
-    private static final String SCHEMA_SUBENTRY_OC = "subschema";
 
     public static final String COLLECTIVE_AREA = "collectiveAttributeSpecificArea";
     public static final String COLLECTIVE_INNERAREA = "collectiveAttributeInnerArea";
     public static final String COLLECTIVE_ATTRIBUTE_SUBENTRIES = "collectiveAttributeSubentries";
-    public static final String COLLECTIVE_SUBENTRY_OC = "collectiveAttributeSubentry";
     
     public static final String TRIGGER_AREA = "triggerSpecificArea";
     public static final String TRIGGER_INNERAREA = "triggerInnerArea";
     public static final String TRIGGER_SUBENTRIES = "triggerSubentries";
 
-
     public static final String[] SUBENTRY_OPATTRS =
         { AUTONOUMOUS_AREA_SUBENTRY, AC_SUBENTRY, SCHEMA_AREA_SUBENTRY, COLLECTIVE_ATTRIBUTE_SUBENTRIES,
TRIGGER_SUBENTRIES };
 
@@ -191,24 +186,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;
@@ -483,8 +478,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 ) )
                 {
@@ -503,11 +497,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 ) )
                         {
@@ -517,11 +506,6 @@
                                 operational = new LockableAttributeImpl( AC_SUBENTRY );
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isAccessControlSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else if ( role.equalsIgnoreCase( SCHEMA_AREA ) )
                         {
@@ -531,11 +515,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 ) )
@@ -546,11 +525,6 @@
                                 operational = new LockableAttributeImpl( COLLECTIVE_ATTRIBUTE_SUBENTRIES
);
                                 entry.put( operational );
                             }
-                            
-                            if ( subentry.isCollectiveSubentry() )
-                            {
-                                operational.add( subentryDn.toString() );
-                            }
                         }
                         else if ( role.equalsIgnoreCase( TRIGGER_AREA ) || role.equalsIgnoreCase(
TRIGGER_INNERAREA ) )
                         {
@@ -574,7 +548,7 @@
                                     + " triggerArea and triggerInnerArea.", ResultCodeEnum.CONSTRAINTVIOLATION
);
                         }
 
-//                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.toString() );
                     }
                 }
             }



Mime
View raw message