directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r985411 [2/11] - in /directory: apacheds/branches/apacheds-codec-merge/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/admin/ apacheds...
Date Sat, 14 Aug 2010 00:22:40 GMT
Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java Sat Aug 14 00:22:38 2010
@@ -29,9 +29,7 @@ import static org.junit.Assert.assertTru
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
@@ -39,6 +37,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.After;
@@ -53,7 +53,7 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-@CreateDS( name="SimpleAuthenticationIT-DS" )
+@CreateDS(name = "SimpleAuthenticationIT-DS")
 public class SimpleAuthenticationIT extends AbstractLdapTestUnit
 {
     /**
@@ -90,7 +90,7 @@ public class SimpleAuthenticationIT exte
         String userDn = "uid=admin,ou=system";
         LdapConnection connection = getConnectionAs( service, userDn, "secret" );
 
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         performAdminAccountChecks( entry );
         assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), StringTools
             .getBytesUtf8( "secret" ) ) );
@@ -100,7 +100,7 @@ public class SimpleAuthenticationIT exte
         service.startup();
 
         connection = getConnectionAs( service, userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         performAdminAccountChecks( entry );
         assertTrue( ArrayUtils.isEquals( entry.get( "userPassword" ).get().getBytes(), StringTools
             .getBytesUtf8( "secret" ) ) );
@@ -115,7 +115,7 @@ public class SimpleAuthenticationIT exte
         String userDn = "uid=akarasulu,ou=users,ou=system";
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         EntryAttribute ou = entry.get( "ou" );
         assertTrue( ou.contains( "Engineering" ) );
         assertTrue( ou.contains( "People" ) );
@@ -180,7 +180,7 @@ public class SimpleAuthenticationIT exte
 
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         EntryAttribute ou = entry.get( "ou" );
         assertTrue( ou.contains( "Engineering" ) );
         assertTrue( ou.contains( "People" ) );
@@ -209,13 +209,13 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // close and try again now with new password (should succeed)
         connection.bind( userDn, "newpwd" );
 
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         ou = entry.get( "ou" );
         assertTrue( ou.contains( "Engineering" ) );
         assertTrue( ou.contains( "People" ) );
@@ -247,7 +247,7 @@ public class SimpleAuthenticationIT exte
 
         // Check that we can get the attributes
 
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -259,13 +259,13 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "secret" );
         assertTrue( connection.isAuthenticated() );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -274,7 +274,7 @@ public class SimpleAuthenticationIT exte
         connection.close();
         connection.bind( userDn, "secret" );
         assertTrue( connection.isAuthenticated() );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -288,7 +288,7 @@ public class SimpleAuthenticationIT exte
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
         // Check that we can get the attributes
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -300,12 +300,12 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -313,7 +313,7 @@ public class SimpleAuthenticationIT exte
         // cache is updated (should be successfull)
         connection.close();
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -327,7 +327,7 @@ public class SimpleAuthenticationIT exte
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
         // Check that we can get the attributes
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -339,12 +339,12 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "test123" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -352,7 +352,7 @@ public class SimpleAuthenticationIT exte
         // cache is updated (should be successfull)
         connection.close();
         connection.bind( userDn, "test123" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -366,7 +366,7 @@ public class SimpleAuthenticationIT exte
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
         // Check that we can get the attributes
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -378,12 +378,12 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -392,7 +392,7 @@ public class SimpleAuthenticationIT exte
 
         connection.close();
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -406,7 +406,7 @@ public class SimpleAuthenticationIT exte
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
         // Check that we can get the attributes
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -418,12 +418,12 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -431,7 +431,7 @@ public class SimpleAuthenticationIT exte
         // cache is updated (should be successfull)
         connection.close();
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -445,7 +445,7 @@ public class SimpleAuthenticationIT exte
         LdapConnection connection = getConnectionAs( service, userDn, "test" );
 
         // Check that we can get the attributes
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
@@ -457,19 +457,19 @@ public class SimpleAuthenticationIT exte
         // close and try with old password (should fail)
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
 
         // try again now with new password (should be successful)
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
 
         // try again now with new password, to check that the
         // cache is updated (should be successfull)
         connection.bind( userDn, "secret" );
-        entry = ( ( SearchResultEntry ) connection.lookup( userDn ) ).getEntry();
+        entry = ( ( InternalSearchResultEntry ) connection.lookup( userDn ) ).getEntry();
         assertNotNull( entry );
         assertTrue( entry.get( "uid" ).contains( "akarasulu" ) );
     }
@@ -495,7 +495,7 @@ public class SimpleAuthenticationIT exte
         connection.modify( modReq );
         connection.close();
 
-        BindResponse bindResp = connection.bind( userDn, "test" );
+        InternalBindResponse bindResp = connection.bind( userDn, "test" );
         assertEquals( ResultCodeEnum.INVALID_CREDENTIALS, bindResp.getLdapResult().getResultCode() );
     }
 }

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java Sat Aug 14 00:22:38 2010
@@ -32,11 +32,8 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AbstractResponseWithResult;
 import org.apache.directory.ldap.client.api.message.AddRequest;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.ModifyResponse;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.annotations.CreateDS;
@@ -58,6 +55,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.After;
@@ -65,21 +65,17 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+
 /**
  * Test cases for testing PasswordPolicy implementation.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-@CreateLdapServer ( 
-    transports = 
-    {
-        @CreateTransport( protocol = "LDAP" ), 
-        @CreateTransport( protocol = "LDAPS" ) 
-    })
-
+@CreateLdapServer(transports =
+    { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
 // disable changelog, for more info see DIRSERVER-1528
-@CreateDS( enableChangeLog=false)
+@CreateDS(enableChangeLog = false)
 public class PasswordPolicyTest extends AbstractLdapTestUnit
 {
     private PasswordPolicyConfiguration policyConfig;
@@ -93,7 +89,7 @@ public class PasswordPolicyTest extends 
     public void setPwdPolicy() throws LdapException
     {
         policyConfig = new PasswordPolicyConfiguration();
-        
+
         policyConfig.setPwdMaxAge( 110 );
         policyConfig.setPwdFailureCountInterval( 30 );
         policyConfig.setPwdMaxFailure( 2 );
@@ -108,7 +104,7 @@ public class PasswordPolicyTest extends 
         AuthenticationInterceptor authInterceptor = ( AuthenticationInterceptor ) service
             .getInterceptor( AuthenticationInterceptor.class.getName() );
         authInterceptor.setPwdPolicyConfig( policyConfig );
-        
+
         authInterceptor.loadPwdPolicyStateAtributeTypes();
     }
 
@@ -126,17 +122,13 @@ public class PasswordPolicyTest extends 
         LdapConnection connection = getAdminNetworkConnection( ldapServer );
 
         DN userDn = new DN( "cn=user,ou=system" );
-        Entry userEntry = LdifUtils.createEntry( userDn, 
-            "ObjectClass: top",
-            "ObjectClass: person",
-            "cn: user",
-            "sn: user_sn",
-            "userPassword: 1234" ); 
+        Entry userEntry = LdifUtils.createEntry( userDn, "ObjectClass: top", "ObjectClass: person", "cn: user",
+            "sn: user_sn", "userPassword: 1234" );
 
         AddRequest addReq = new AddRequest( userEntry );
         addReq.add( PP_REQ_CTRL );
 
-        AddResponse addResp = connection.add( addReq );
+        InternalAddResponse addResp = connection.add( addReq );
         assertEquals( ResultCodeEnum.CONSTRAINT_VIOLATION, addResp.getLdapResult().getResultCode() );
 
         PasswordPolicyResponseControl respCtrl = getPwdRespCtrl( addResp );
@@ -146,7 +138,7 @@ public class PasswordPolicyTest extends 
         EntryAttribute pwdAt = userEntry.get( SchemaConstants.USER_PASSWORD_AT );
         pwdAt.clear();
         pwdAt.add( "12345" );
-        
+
         addResp = connection.add( addReq );
         assertEquals( ResultCodeEnum.SUCCESS, addResp.getLdapResult().getResultCode() );
         respCtrl = getPwdRespCtrl( addResp );
@@ -163,10 +155,11 @@ public class PasswordPolicyTest extends 
     {
         LdapConnection connection = getAdminNetworkConnection( ldapServer );
 
-        byte[] password = PasswordUtil.encryptPassword( "12345".getBytes(), LdapSecurityConstants.HASH_METHOD_CRYPT, null );
+        byte[] password = PasswordUtil.encryptPassword( "12345".getBytes(), LdapSecurityConstants.HASH_METHOD_CRYPT,
+            null );
         String strPwd = "{crypt}" + StringTools.utf8ToString( password );
         password = strPwd.getBytes();
-        
+
         DN userDn = new DN( "cn=hashedpwd,ou=system" );
         Entry userEntry = new DefaultEntry( userDn );
         userEntry.add( SchemaConstants.OBJECT_CLASS, SchemaConstants.PERSON_OC );
@@ -177,7 +170,7 @@ public class PasswordPolicyTest extends 
         AddRequest addReq = new AddRequest( userEntry );
         addReq.add( PP_REQ_CTRL );
 
-        AddResponse addResp = connection.add( addReq );
+        InternalAddResponse addResp = connection.add( addReq );
         assertEquals( ResultCodeEnum.CONSTRAINT_VIOLATION, addResp.getLdapResult().getResultCode() );
 
         PasswordPolicyResponseControl respCtrl = getPwdRespCtrl( addResp );
@@ -188,65 +181,64 @@ public class PasswordPolicyTest extends 
         EntryAttribute pwdAt = userEntry.get( SchemaConstants.USER_PASSWORD_AT );
         pwdAt.clear();
         pwdAt.add( password );
-        
+
         addResp = connection.add( addReq );
         assertEquals( ResultCodeEnum.SUCCESS, addResp.getLdapResult().getResultCode() );
         respCtrl = getPwdRespCtrl( addResp );
         assertNull( respCtrl );
 
-        LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), StringTools.utf8ToString( password ) );
+        LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), StringTools
+            .utf8ToString( password ) );
         assertNotNull( userConnection );
         assertTrue( userConnection.isAuthenticated() );
     }
 
-    
+
     @Test
     public void testPwdMinAge() throws Exception
     {
         policyConfig.setPwdMinAge( 5 );
-        
+
         LdapConnection connection = getAdminNetworkConnection( ldapServer );
-        
+
         DN userDn = new DN( "cn=userMinAge,ou=system" );
-        Entry userEntry = LdifUtils.createEntry( userDn, 
-            "ObjectClass: top",
-            "ObjectClass: person",
-            "cn: userMinAge",
-            "sn: userMinAge_sn",
-            "userPassword: 12345" ); 
+        Entry userEntry = LdifUtils.createEntry( userDn, "ObjectClass: top", "ObjectClass: person", "cn: userMinAge",
+            "sn: userMinAge_sn", "userPassword: 12345" );
 
         AddRequest addReq = new AddRequest( userEntry );
         addReq.add( PP_REQ_CTRL );
 
-        AddResponse addResp = connection.add( addReq );
+        InternalAddResponse addResp = connection.add( addReq );
         assertEquals( ResultCodeEnum.SUCCESS, addResp.getLdapResult().getResultCode() );
 
         PasswordPolicyResponseControl respCtrl = getPwdRespCtrl( addResp );
         assertNull( respCtrl );
-        
+
         ModifyRequest modReq = new ModifyRequest( userDn );
         modReq.add( PP_REQ_CTRL );
         modReq.replace( SchemaConstants.USER_PASSWORD_AT, "123456" );
-        
-        ModifyResponse modResp = connection.modify( modReq );
+
+        InternalModifyResponse modResp = connection.modify( modReq );
         assertEquals( ResultCodeEnum.CONSTRAINT_VIOLATION, modResp.getLdapResult().getResultCode() );
-        
+
         respCtrl = getPwdRespCtrl( modResp );
         assertEquals( PASSWORD_TOO_YOUNG, respCtrl.getPasswordPolicyError() );
-        
+
         Thread.sleep( 5000 );
-      
+
         modResp = connection.modify( modReq );
         assertEquals( ResultCodeEnum.SUCCESS, modResp.getLdapResult().getResultCode() );
-        
+
         LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), "123456" );
         assertNotNull( userConnection );
         assertTrue( userConnection.isAuthenticated() );
     }
 
-    private PasswordPolicyResponseControl getPwdRespCtrl( AbstractResponseWithResult resp ) throws Exception
+
+    private PasswordPolicyResponseControl getPwdRespCtrl( InternalResponse resp ) throws Exception
     {
-        Control ctrl = resp.getControl( PP_REQ_CTRL.getOid() );
+        Control ctrl = resp.getControls().get( PP_REQ_CTRL.getOid() );
+
         if ( ctrl == null )
         {
             return null;

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java Sat Aug 14 00:22:38 2010
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
@@ -37,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -49,7 +49,7 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
+@RunWith(FrameworkRunner.class)
 public class AddAuthorizationIT extends AbstractLdapTestUnit
 {
 
@@ -59,15 +59,15 @@ public class AddAuthorizationIT extends 
         AutzIntegUtils.service = service;
         service.setAccessControlEnabled( true );
     }
-    
-    
+
+
     @After
     public void closeConnections()
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Checks if a simple entry (organizationalUnit) can be added to the DIT at an
      * RDN relative to ou=system by a specific non-admin user.  If a permission exception
@@ -92,17 +92,17 @@ public class AddAuthorizationIT extends 
             Entry entry = new DefaultEntry( new DN( "ou=testou,ou=system" ) );
             entry.add( SchemaConstants.OU_AT, "testou" );
             entry.add( SchemaConstants.OBJECT_CLASS_AT, "organizationalUnit" );
-            
-            AddResponse resp = connection.add( entry );
-            
-            if( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
+
+            InternalAddResponse resp = connection.add( entry );
+
+            if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
             {
                 return false;
             }
 
             connection.delete( entry.getDn() );
             connection.close();
-            
+
             return true;
         }
         catch ( LdapException e )
@@ -128,24 +128,11 @@ public class AddAuthorizationIT extends 
 
         // Gives grantAdd perm to all users in the Administrators group for
         // entries and all attribute types and values
-        createAccessControlSubentry( 
-            "administratorAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantAdd, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "administratorAdd", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " + "    userPermissions "
+            + "    { " + "      { " + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantAdd, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // see if we can now add that test entry which we could not before
         // add op should still fail since billd is not in the admin group
@@ -174,24 +161,11 @@ public class AddAuthorizationIT extends 
         assertFalse( checkCanAddEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables user billyd to add an entry below ou=system
-        createAccessControlSubentry( 
-            "billydAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantAdd, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billydAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "    userPermissions " + "    { "
+            + "      { " + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantAdd, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanAddEntryAs( "billyd", "billyd", "ou=testou" ) );
@@ -213,27 +187,12 @@ public class AddAuthorizationIT extends 
         assertFalse( checkCanAddEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables user billyd to add an entry below ou=system
-        createAccessControlSubentry( 
-            "billyAddBySubtree", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses " +
-            "    { " +
-            "      subtree { { base \"ou=users,ou=system\" } } " +
-            "    }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantAdd, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billyAddBySubtree", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses " + "    { " + "      subtree { { base \"ou=users,ou=system\" } } " + "    }, "
+            + "    userPermissions " + "    { " + "      { "
+            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantAdd, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // should work now that billyd is authorized by the subtree userClass
         assertTrue( checkCanAddEntryAs( "billyd", "billyd", "ou=testou" ) );
@@ -255,24 +214,11 @@ public class AddAuthorizationIT extends 
         assertFalse( checkCanAddEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables anyone to add an entry below ou=system
-        createAccessControlSubentry( 
-            "anybodyAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " + 
-            "    userClasses { allUsers }, " +
-            "    userPermissions " +
-            "    { " +
-            "      { " + 
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantAdd, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "anybodyAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
+            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantAdd, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // see if we can now add that test entry which we could not before
         // should work now with billyd now that all users are authorized

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AdministratorsGroupIT.java Sat Aug 14 00:22:38 2010
@@ -27,11 +27,11 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -45,33 +45,34 @@ import org.junit.runner.RunWith;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
+@RunWith(FrameworkRunner.class)
 public class AdministratorsGroupIT extends AbstractLdapTestUnit
 {
-    
+
     @Before
     public void setService()
     {
-       AutzIntegUtils.service = service;
+        AutzIntegUtils.service = service;
     }
-    
-    
+
+
     @After
     public void closeConnections()
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     boolean canReadAdministrators( LdapConnection connection ) throws Exception
     {
-        SearchResultEntry res = ( SearchResultEntry ) connection.lookup( "cn=Administrators,ou=groups,ou=system" );
-        
-        if( res == null )
+        InternalSearchResultEntry res = ( InternalSearchResultEntry ) connection
+            .lookup( "cn=Administrators,ou=groups,ou=system" );
+
+        if ( res == null )
         {
             return false;
         }
-        
+
         return true;
     }
 
@@ -86,7 +87,7 @@ public class AdministratorsGroupIT exten
      * @throws Exception on failures
      */
     @Test
-    @CreateDS ( enableAccessControl=true, name="testNonAdminReadAccessToGroups-method" )
+    @CreateDS(enableAccessControl = true, name = "testNonAdminReadAccessToGroups-method")
     public void testNonAdminReadAccessToGroups() throws Exception
     {
         DN billydDn = createUser( "billyd", "s3kr3t" );
@@ -96,7 +97,7 @@ public class AdministratorsGroupIT exten
         LdapConnection connection = getConnectionAs( billydDn, "s3kr3t" );
         assertTrue( connection.isAuthenticated() );
         assertFalse( canReadAdministrators( connection ) );
-        
+
         // add billyd to administrators and try again
         addUserToGroup( "billyd", "Administrators" );
 
@@ -114,7 +115,7 @@ public class AdministratorsGroupIT exten
      * @throws Exception on failure
      */
     @Test
-    @CreateDS ( name="testDefaultNonAdminReadAccessToGroups-method" )
+    @CreateDS(name = "testDefaultNonAdminReadAccessToGroups-method")
     public void testDefaultNonAdminReadAccessToGroups() throws Exception
     {
         DN billydDn = createUser( "billyd", "s3kr3t" );

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java Sat Aug 14 00:22:38 2010
@@ -29,11 +29,7 @@ import java.util.HashSet;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
-import org.apache.directory.ldap.client.api.message.ModifyDnResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.SearchResponse;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
@@ -42,6 +38,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -73,8 +73,8 @@ public class AuthorizationServiceAsAdmin
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Makes sure the admin cannot delete the admin account.
      *
@@ -83,7 +83,7 @@ public class AuthorizationServiceAsAdmin
     @Test
     public void testNoDeleteOnAdminByAdmin() throws Exception
     {
-        DeleteResponse delResp = getAdminConnection().delete( "uid=admin,ou=system" );
+        InternalDeleteResponse delResp = getAdminConnection().delete( "uid=admin,ou=system" );
         assertEquals( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, delResp.getLdapResult().getResultCode() );
     }
 
@@ -96,7 +96,8 @@ public class AuthorizationServiceAsAdmin
     @Test
     public void testNoRdnChangesOnAdminByAdmin() throws Exception
     {
-        ModifyDnResponse resp = getAdminConnection().rename( new DN( "uid=admin,ou=system" ), new RDN( "uid=alex" ) );
+        InternalModifyDnResponse resp = getAdminConnection().rename( new DN( "uid=admin,ou=system" ),
+            new RDN( "uid=alex" ) );
         assertEquals( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, resp.getLdapResult().getResultCode() );
     }
 
@@ -118,7 +119,7 @@ public class AuthorizationServiceAsAdmin
         connection.close();
 
         connection = getConnectionAs( adminDN, newPwd );
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( adminDN.getName() ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( adminDN.getName() ) ).getEntry();
         assertTrue( ArrayUtils.isEquals( StringTools.getBytesUtf8( newPwd ), entry.get( "userPassword" ).get()
             .getBytes() ) );
     }
@@ -136,11 +137,11 @@ public class AuthorizationServiceAsAdmin
 
         HashSet<String> set = new HashSet<String>();
 
-        Cursor<SearchResponse> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" );
+        Cursor<InternalResponse> cursor = connection.search( "ou=system", "(objectClass=*)", SearchScope.SUBTREE, "*" );
 
         while ( cursor.next() )
         {
-            Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
+            Entry result = ( ( InternalSearchResultEntry ) cursor.get() ).getEntry();
             set.add( result.getDn().getName() );
         }
 

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java Sat Aug 14 00:22:38 2010
@@ -28,11 +28,11 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertNull;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -46,7 +46,7 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
+@RunWith(FrameworkRunner.class)
 public class AuthzAuthnIT extends AbstractLdapTestUnit
 {
 
@@ -56,15 +56,15 @@ public class AuthzAuthnIT extends Abstra
         AutzIntegUtils.service = service;
         service.setAccessControlEnabled( true );
     }
-    
-    
+
+
     @After
     public void closeConnections()
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Checks to make sure a user can authenticate with RootDSE as the
      * provider URL without need of any access control permissions.
@@ -76,15 +76,15 @@ public class AuthzAuthnIT extends Abstra
     {
         createUser( "billyd", "billyd" );
 
-        DN userName = new DN( "uid=billyd,ou=users,ou=system" ); 
+        DN userName = new DN( "uid=billyd,ou=users,ou=system" );
         // Authenticate to RootDSE
         LdapConnection connection = getConnectionAs( userName, "billyd" );
-        Entry entry = ( ( SearchResultEntry ) connection.lookup( "" ) ).getEntry();
+        Entry entry = ( ( InternalSearchResultEntry ) connection.lookup( "" ) ).getEntry();
         assertNotNull( entry );
         assertEquals( 0, entry.getDn().size() );
     }
-    
-    
+
+
     /**
      * Checks to make sure a user cannot authenticate with a naming context
      * as the provider URL if it does not have appropriate Browse permissions.
@@ -95,56 +95,43 @@ public class AuthzAuthnIT extends Abstra
     public void testAuthnFailsWithSystemPartition() throws Exception
     {
         createUser( "billyd", "billyd" );
-        
-        DN userName = new DN( "uid=billyd,ou=users,ou=system" ); 
+
+        DN userName = new DN( "uid=billyd,ou=users,ou=system" );
         LdapConnection connection = getConnectionAs( userName, "billyd" );
-        SearchResultEntry entry = ( SearchResultEntry ) connection.lookup( "ou=system" );
+        InternalSearchResultEntry entry = ( InternalSearchResultEntry ) connection.lookup( "ou=system" );
         assertNull( entry );
     }
-    
-    
+
+
     /**
      * Checks to make sure a user can authenticate with a naming context
      * as the provider URL if it has appropriate Browse permissions.
      *
      * @throws Exception if the test encounters an error
      */
-    @Ignore( "This test is not failing but I want to make sure that this test case is equivalent to its prior JNDI based impl, so ignoring this to get attention" )
+    @Ignore("This test is not failing but I want to make sure that this test case is equivalent to its prior JNDI based impl, so ignoring this to get attention")
     @Test
     public void testAuthnPassesWithSystemPartition() throws Exception
     {
         createUser( "billyd", "billyd" );
-        
+
         // Create ACI with minimum level of required privileges:
         // Only for user "uid=billyd,ou=users,ou=system"
         // Only to The entry "ou=system"
         // Only Browse permission
         // Note: In order to read contents of the bound context
         //       user will need appropriate Read permissions.
-        createAccessControlSubentry(
-            "grantBrowseForTheWholeNamingContext",
-            "{ maximum 0 }", // !!!!! Replace this with "{ minimum 1 }" for practicing !
-            "{ " + 
-            "  identificationTag \"browseACI\", " +
-            "  precedence 14, " + 
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems { entry }, " +
-            "        grantsAndDenials { grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
-        
-        DN userName = new DN( "uid=billyd,ou=users,ou=system" ); 
-        
+        createAccessControlSubentry( "grantBrowseForTheWholeNamingContext", "{ maximum 0 }", // !!!!! Replace this with "{ minimum 1 }" for practicing !
+            "{ " + "  identificationTag \"browseACI\", " + "  precedence 14, " + "  authenticationLevel none, "
+                + "  itemOrUserFirst userFirst: " + "  { "
+                + "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "    userPermissions "
+                + "    { " + "      { " + "        protectedItems { entry }, "
+                + "        grantsAndDenials { grantBrowse } " + "      } " + "    } " + "  } " + "}" );
+
+        DN userName = new DN( "uid=billyd,ou=users,ou=system" );
+
         LdapConnection connection = getConnectionAs( userName, "billyd" );
-        SearchResultEntry entry = ( SearchResultEntry ) connection.lookup( "ou=system" );
+        InternalSearchResultEntry entry = ( InternalSearchResultEntry ) connection.lookup( "ou=system" );
         assertNull( entry );
     }
 }

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java Sat Aug 14 00:22:38 2010
@@ -21,9 +21,7 @@ package org.apache.directory.server.core
 
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.AddResponse;
 import org.apache.directory.ldap.client.api.message.ModifyRequest;
-import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.IntegrationUtils;
@@ -32,6 +30,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalAddResponse;
+import org.apache.directory.shared.ldap.message.internal.InternalSearchResultEntry;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -45,6 +45,7 @@ public class AutzIntegUtils
 {
     public static DirectoryService service;
 
+
     // -----------------------------------------------------------------------
     // Utility methods used by subclasses
     // -----------------------------------------------------------------------
@@ -232,7 +233,7 @@ public class AutzIntegUtils
     {
         LdapConnection connection = getAdminConnection();
 
-        Entry systemEntry = ( ( SearchResultEntry ) connection.lookup( ServerDNConstants.SYSTEM_DN, "+", "*" ) )
+        Entry systemEntry = ( ( InternalSearchResultEntry ) connection.lookup( ServerDNConstants.SYSTEM_DN, "+", "*" ) )
             .getEntry();
 
         // modify ou=system to be an AP for an A/C AA if it is not already
@@ -252,7 +253,7 @@ public class AutzIntegUtils
         subEntry.add( SchemaConstants.SUBTREE_SPECIFICATION_AT, subtree );
         subEntry.add( SchemaConstants.PRESCRIPTIVE_ACI_AT, aciItem );
 
-        AddResponse addResp = connection.add( subEntry );
+        InternalAddResponse addResp = connection.add( subEntry );
 
         return addResp.getLdapResult().getResultCode();
     }

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java Sat Aug 14 00:22:38 2010
@@ -30,7 +30,6 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.CompareResponse;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
@@ -39,6 +38,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalCompareResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -51,8 +51,8 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
-@CreateDS( enableAccessControl=true )
+@RunWith(FrameworkRunner.class)
+@CreateDS(enableAccessControl = true)
 public class CompareAuthorizationIT extends AbstractLdapTestUnit
 {
 
@@ -61,15 +61,15 @@ public class CompareAuthorizationIT exte
     {
         AutzIntegUtils.service = service;
     }
-    
-    
+
+
     @After
     public void closeConnections()
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Checks if an attribute of a simple entry (an organizationalUnit's telephoneNumber)
      * with an RDN relative to ou=system can be compared by a specific non-admin user.
@@ -95,7 +95,7 @@ public class CompareAuthorizationIT exte
 
         DN entryDN = new DN( entryRdn + ",ou=system" );
         boolean result = true;
-        
+
         // create the entry with the telephoneNumber attribute to compare
         Entry testEntry = new DefaultEntry( entryDN );
         testEntry.add( SchemaConstants.OBJECT_CLASS_AT, "organizationalUnit" );
@@ -106,18 +106,18 @@ public class CompareAuthorizationIT exte
 
         // create the entry as admin
         adminConnection.add( testEntry );
-        
+
         DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
         // compare the telephone numbers
         LdapConnection userConnection = getConnectionAs( userName, password );
-        CompareResponse resp = userConnection.compare( entryDN, "telephoneNumber", number );
-        
+        InternalCompareResponse resp = userConnection.compare( entryDN, "telephoneNumber", number );
+
         // don't set based on compare result success/failure but based on whether the op was permitted or not
-        if( resp.getLdapResult().getResultCode() == ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS )
+        if ( resp.getLdapResult().getResultCode() == ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS )
         {
             result = false;
         }
-        
+
         // let's clean up
         adminConnection.delete( entryRdn );
 
@@ -141,23 +141,12 @@ public class CompareAuthorizationIT exte
 
         // Gives grantCompare, and grantRead perm to all users in the Administrators group for
         // entries and all attribute types and values
-        createAccessControlSubentry( "administratorAdd", 
-            "{ " +
-            "  identificationTag \"addAci\", " +
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }" +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems { entry, allUserAttributeTypesAndValues }, " +
-            "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "administratorAdd", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }" + "    userPermissions "
+            + "    { " + "      { " + "        protectedItems { entry, allUserAttributeTypesAndValues }, "
+            + "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " + "      } " + "    } " + "  } "
+            + "}" );
 
         // see if we can now add that test entry which we could not before
         // add op should still fail since billd is not in the admin group
@@ -186,23 +175,12 @@ public class CompareAuthorizationIT exte
         assertFalse( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
 
         // now add a subentry that enables user billyd to compare an entry below ou=system
-        createAccessControlSubentry( "billydAdd", 
-            "{ " +
-            "  identificationTag \"addAci\", " +
-            "  precedence 14, " +
-            "  authenticationLevel none, " +
-            "  itemOrUserFirst userFirst: " + 
-            "  { " +
-            "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " +
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems { entry, allUserAttributeTypesAndValues }, " +
-            "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billydAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "    userPermissions " + "    { "
+            + "      { " + "        protectedItems { entry, allUserAttributeTypesAndValues }, "
+            + "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " + "      } " + "    } " + "  } "
+            + "}" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
@@ -224,27 +202,13 @@ public class CompareAuthorizationIT exte
         assertFalse( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
 
         // now add a subentry that enables user billyd to compare an entry below ou=system
-        createAccessControlSubentry( 
-            "billyAddBySubtree", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses " +
-            "    { " +
-            "      subtree { { base \"ou=users,ou=system\" } } " +
-            "    }, " + 
-            "    userPermissions " +
-            "    { " +
-            "        { " +
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billyAddBySubtree", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses " + "    { " + "      subtree { { base \"ou=users,ou=system\" } } " + "    }, "
+            + "    userPermissions " + "    { " + "        { "
+            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " + "      } " + "    } " + "  } "
+            + "}" );
 
         // should work now that billyd is authorized by the subtree userClass
         assertTrue( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
@@ -266,24 +230,12 @@ public class CompareAuthorizationIT exte
         assertFalse( checkCanCompareTelephoneNumberAs( "billyd", "billyd", "ou=testou", "867-5309" ) );
 
         // now add a subentry that enables anyone to add an entry below ou=system
-        createAccessControlSubentry( 
-            "anybodyAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " + 
-            "    userClasses { allUsers }, " +
-            "    userPermissions " +
-            "    { " +
-            "      { " + 
-            "        protectedItems {entry, allUserAttributeTypesAndValues}, " +
-            "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "anybodyAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
+            + "        protectedItems {entry, allUserAttributeTypesAndValues}, "
+            + "        grantsAndDenials { grantCompare, grantRead, grantBrowse } " + "      } " + "    } " + "  } "
+            + "}" );
 
         // see if we can now compare that test entry's number which we could not before
         // should work with billyd now that all users are authorized
@@ -306,8 +258,8 @@ public class CompareAuthorizationIT exte
 
         adminCtx.add( user );
 
-        CompareResponse resp = adminCtx.compare( userDN, "userPassword", "bobspassword" );
-        assertEquals(  ResultCodeEnum.COMPARE_TRUE, resp.getLdapResult().getResultCode() );
+        InternalCompareResponse resp = adminCtx.compare( userDN, "userPassword", "bobspassword" );
+        assertEquals( ResultCodeEnum.COMPARE_TRUE, resp.getLdapResult().getResultCode() );
     }
 
 }

Modified: directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java?rev=985411&r1=985410&r2=985411&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java (original)
+++ directory/apacheds/branches/apacheds-codec-merge/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java Sat Aug 14 00:22:38 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.core.authz;
 
+
 import static org.apache.directory.server.core.authz.AutzIntegUtils.addUserToGroup;
 import static org.apache.directory.server.core.authz.AutzIntegUtils.createAccessControlSubentry;
 import static org.apache.directory.server.core.authz.AutzIntegUtils.createUser;
@@ -28,7 +29,6 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.message.DeleteResponse;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
@@ -37,6 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -49,9 +50,9 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
-@CreateDS( enableAccessControl=true )
-public class DeleteAuthorizationIT extends AbstractLdapTestUnit 
+@RunWith(FrameworkRunner.class)
+@CreateDS(enableAccessControl = true)
+public class DeleteAuthorizationIT extends AbstractLdapTestUnit
 {
 
     @Before
@@ -59,15 +60,15 @@ public class DeleteAuthorizationIT exten
     {
         AutzIntegUtils.service = service;
     }
-    
-    
+
+
     @After
     public void closeConnections()
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Checks if a simple entry (organizationalUnit) can be deleted from the DIT at an
      * RDN relative to ou=system by a specific non-admin user.  The entry is first
@@ -90,7 +91,7 @@ public class DeleteAuthorizationIT exten
     public boolean checkCanDeleteEntryAs( String uid, String password, String entryRdn ) throws Exception
     {
         DN entryDN = new DN( entryRdn + ",ou=system" );
-        
+
         // create the entry with the telephoneNumber attribute to compare
         Entry testEntry = new DefaultEntry( entryDN );
         testEntry.add( SchemaConstants.OBJECT_CLASS_AT, "organizationalUnit" );
@@ -100,14 +101,14 @@ public class DeleteAuthorizationIT exten
 
         // create the entry as admin
         adminConnection.add( testEntry );
-        
+
         DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
-        
+
         // delete the newly created context as the user
         LdapConnection userConnection = getConnectionAs( userName, password );
-        DeleteResponse resp = userConnection.delete( entryDN );
+        InternalDeleteResponse resp = userConnection.delete( entryDN );
 
-        if( resp.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
+        if ( resp.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
         {
             return true;
         }
@@ -135,24 +136,11 @@ public class DeleteAuthorizationIT exten
 
         // Gives grantRemove perm to all users in the Administrators group for
         // entries and all attribute types and values
-        createAccessControlSubentry( 
-            "administratorAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry}, " + 
-            "       grantsAndDenials { grantRemove, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "administratorAdd", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { userGroup { \"cn=Administrators,ou=groups,ou=system\" } }, " + "    userPermissions "
+            + "    { " + "      { " + "        protectedItems {entry}, "
+            + "       grantsAndDenials { grantRemove, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // see if we can now delete that test entry which we could not before
         // delete op should still fail since billd is not in the admin group
@@ -181,24 +169,11 @@ public class DeleteAuthorizationIT exten
         assertFalse( checkCanDeleteEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables user billyd to delete an entry below ou=system
-        createAccessControlSubentry( 
-            "billydAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry}, " + 
-            "        grantsAndDenials { grantRemove, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billydAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { name { \"uid=billyd,ou=users,ou=system\" } }, " + "    userPermissions " + "    { "
+            + "      { " + "        protectedItems {entry}, "
+            + "        grantsAndDenials { grantRemove, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // should work now that billyd is authorized by name
         assertTrue( checkCanDeleteEntryAs( "billyd", "billyd", "ou=testou" ) );
@@ -220,27 +195,11 @@ public class DeleteAuthorizationIT exten
         assertFalse( checkCanDeleteEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables user billyd to delte an entry below ou=system
-        createAccessControlSubentry( 
-            "billyAddBySubtree", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " +
-            "    userClasses " +
-            "    { " +
-            "      subtree { { base \"ou=users,ou=system\" } } " +
-            "    }, " + 
-            "    userPermissions " +
-            "    { " +
-            "      { " +
-            "        protectedItems {entry}, " + 
-            "        grantsAndDenials { grantRemove, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "billyAddBySubtree", "{ " + "  identificationTag \"addAci\", "
+            + "  precedence 14, " + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses " + "    { " + "      subtree { { base \"ou=users,ou=system\" } } " + "    }, "
+            + "    userPermissions " + "    { " + "      { " + "        protectedItems {entry}, "
+            + "        grantsAndDenials { grantRemove, grantBrowse } " + "      } " + "    } " + "  } " + "}" );
 
         // should work now that billyd is authorized by the subtree userClass
         assertTrue( checkCanDeleteEntryAs( "billyd", "billyd", "ou=testou" ) );
@@ -262,24 +221,11 @@ public class DeleteAuthorizationIT exten
         assertFalse( checkCanDeleteEntryAs( "billyd", "billyd", "ou=testou" ) );
 
         // now add a subentry that enables anyone to add an entry below ou=system
-        createAccessControlSubentry( 
-            "anybodyAdd", 
-            "{ " + 
-            "  identificationTag \"addAci\", " + 
-            "  precedence 14, " +
-            "  authenticationLevel none, " + 
-            "  itemOrUserFirst userFirst: " +
-            "  { " + 
-            "    userClasses { allUsers }, " +
-            "    userPermissions " +
-            "    { " +
-            "      { " + 
-            "        protectedItems {entry}, " +
-            "        grantsAndDenials { grantRemove, grantBrowse } " +
-            "      } " +
-            "    } " +
-            "  } " +
-            "}" );
+        createAccessControlSubentry( "anybodyAdd", "{ " + "  identificationTag \"addAci\", " + "  precedence 14, "
+            + "  authenticationLevel none, " + "  itemOrUserFirst userFirst: " + "  { "
+            + "    userClasses { allUsers }, " + "    userPermissions " + "    { " + "      { "
+            + "        protectedItems {entry}, " + "        grantsAndDenials { grantRemove, grantBrowse } "
+            + "      } " + "    } " + "  } " + "}" );
 
         // see if we can now delete that test entry which we could not before
         // should work now with billyd now that all users are authorized



Mime
View raw message