directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1485190 [1/2] - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz: AutzIntegUtils.java SearchAuthorizationIT.java
Date Wed, 22 May 2013 12:36:06 GMT
Author: elecharny
Date: Wed May 22 12:36:06 2013
New Revision: 1485190

URL: http://svn.apache.org/r1485190
Log:
Speed up the SearchAuthz tests

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=1485190&r1=1485189&r2=1485190&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
Wed May 22 12:36:06 2013
@@ -23,6 +23,7 @@ package org.apache.directory.server.core
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.api.ldap.model.entry.Attribute;
+import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
 import org.apache.directory.api.ldap.model.entry.Entry;
 import org.apache.directory.api.ldap.model.message.AddRequest;
@@ -293,6 +294,25 @@ public class AutzIntegUtils
 
 
     /**
+     * Adds and entryACI attribute to an entry specified by a relative name
+     * with respect to ou=system
+     *
+     * @param dn a name relative to ou=system
+     * @param aciItem the entryACI attribute value
+     * @throws Exception if there is a problem adding the attribute
+     */
+    public static void removeEntryACI( Dn dn ) throws Exception
+    {
+        // modify the entry relative to ou=system to include the aciItem
+        ModifyRequest modReq = new ModifyRequestImpl();
+        modReq.setName( dn );
+        modReq.remove( new DefaultAttribute( "entryACI" ) );
+
+        getAdminConnection().modify( modReq );
+    }
+
+
+    /**
      * Adds and subentryACI attribute to ou=system
      *
      * @param aciItem the subentryACI attribute value



Mime
View raw message