From b70f52722021907de362c1fedb8bf60efa22715f Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Tue, 15 May 2007 13:38:26 +0000
Subject: [PATCH] Adding functional test cases for Issue 450, Selfwrite Operation Support.

---
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite.ldif        |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_description_static4.ldif |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_groups.ldif           |    1 
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_groupdn_selfwrite.ldif       |   30 +
 opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml                                |  735 ++++++++++++++++++++++++++++++++++++++++
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_old_member_static2.ldif      |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite.ldif        |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite2.ldif       |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/replace_member_static3.ldif      |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_startup.ldif                               |   55 +++
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_member_static1.ldif      |   29 +
 opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite2.ldif       |   29 +
 opends/tests/functional-tests/shared/functions/ldap.xml                                      |    9 
 13 files changed, 1,062 insertions(+), 0 deletions(-)

diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_groupdn_selfwrite.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_groupdn_selfwrite.ldif
new file mode 100644
index 0000000..e320850
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_groupdn_selfwrite.ldif
@@ -0,0 +1,30 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: ou=aci branch, o=Bind Type Tests, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: aci
+aci: (targetattr="*")(version 3.0; acl "add_groupdn_selfwrite"; allow (search,read) groupdn="ldap:///cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com";)
+
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_description_static4.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_description_static4.ldif
new file mode 100644
index 0000000..be1a11a
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_description_static4.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: description
+description: uid=zuser, ou=People, o=ACI Tests, dc=example,dc=com
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_member_static1.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_member_static1.ldif
new file mode 100644
index 0000000..692a0f9
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_new_member_static1.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: member
+member: uid=zuser, ou=People, o=ACI Tests, dc=example,dc=com
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_groups.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_groups.ldif
index 1d210bd..0976d98 100644
--- a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_groups.ldif
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_groups.ldif
@@ -35,6 +35,7 @@
 member: uid=cuser, ou=People, o=ACI Tests, dc=example,dc=com
 member: uid=duser, ou=People, o=ACI Tests, dc=example,dc=com
 member: uid=euser, ou=People, o=ACI Tests, dc=example,dc=com
+member: uid=zyuser, ou=People, o=ACI Tests, dc=example,dc=com
 owner: uid=euser, ou=People, o=ACI Tests, dc=example,dc=com
 
 dn: cn=Sales,ou=Groups, o=ACI Tests, dc=example,dc=com
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite.ldif
new file mode 100644
index 0000000..67efdeb
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: aci
+aci: (targetattr="member")(version 3.0; acl "add_static_selfwrite"; allow (selfwrite) userdn="ldap:///uid=z*, ou=People, o=ACI Tests, dc=example,dc=com";)
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite2.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite2.ldif
new file mode 100644
index 0000000..2c29b9b
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/add_static_selfwrite2.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+add: aci
+aci: (targetattr="member || description")(version 3.0; acl "add_static_selfwrite"; allow (selfwrite) userdn="ldap:///uid=z*, ou=People, o=ACI Tests, dc=example,dc=com";)
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_old_member_static2.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_old_member_static2.ldif
new file mode 100644
index 0000000..ea3e51a
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_old_member_static2.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+delete: member
+member: uid=zyuser, ou=People, o=ACI Tests, dc=example,dc=com
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite.ldif
new file mode 100644
index 0000000..1c15e83
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+delete: aci
+aci: (targetattr="member")(version 3.0; acl "add_static_selfwrite"; allow (selfwrite) userdn="ldap:///uid=z*, ou=People, o=ACI Tests, dc=example,dc=com";)
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite2.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite2.ldif
new file mode 100644
index 0000000..63d0987
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/del_static_selfwrite2.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+delete: aci
+aci: (targetattr="member || description")(version 3.0; acl "add_static_selfwrite"; allow (selfwrite) userdn="ldap:///uid=z*, ou=People, o=ACI Tests, dc=example,dc=com";)
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/replace_member_static3.ldif b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/replace_member_static3.ldif
new file mode 100644
index 0000000..388c267
--- /dev/null
+++ b/opends/tests/functional-tests/shared/data/aci/aci_bindtypes/replace_member_static3.ldif
@@ -0,0 +1,29 @@
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License").  You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE
+# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at
+# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
+# add the following below this CDDL HEADER, with the fields enclosed
+# by brackets "[]" replaced with your own identifying information:
+#      Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#      Portions Copyright 2007 Sun Microsystems, Inc.
+#
+
+dn: cn=Marketing,ou=Groups, o=ACI Tests, dc=example,dc=com
+changetype: modify
+replace: member
+member: uid=zuser, ou=People, o=ACI Tests, dc=example,dc=com
diff --git a/opends/tests/functional-tests/shared/data/aci/aci_startup.ldif b/opends/tests/functional-tests/shared/data/aci/aci_startup.ldif
index f8c973f..7446c6b 100644
--- a/opends/tests/functional-tests/shared/data/aci/aci_startup.ldif
+++ b/opends/tests/functional-tests/shared/data/aci/aci_startup.ldif
@@ -285,6 +285,42 @@
 roomnumber: 4612
 userpassword: ACIRules
 
+dn: uid=zuser, ou=People, o=ACI Tests, dc=example,dc=com
+cn: Zaci User
+sn: User
+givenname: Zaci
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Development
+ou: People
+l: Austin
+uid: zuser
+mail: zuser@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: ACIRules
+
+dn: uid=zyuser, ou=People, o=ACI Tests, dc=example,dc=com
+cn: Zaci Yuser
+sn: Yuser
+givenname: Zaci
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Development
+ou: People
+l: Austin
+uid: zyuser
+mail: zyuser@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: ACIRules
+
 dn: uid=amanager, ou=People, o=ACI Tests, dc=example,dc=com
 cn: Ana Manager
 sn: manager
@@ -303,6 +339,25 @@
 roomnumber: 4612
 userpassword: ACIRules
 
+dn: uid=aproxy, ou=People, o=ACI Tests, dc=example,dc=com
+cn: Ana Proxy
+sn: proxy
+givenname: Ana
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+ou: Development
+ou: People
+l: Grenoble
+uid: aproxy
+mail: aproxy@example.com
+telephonenumber: +1 408 555 4798
+facsimiletelephonenumber: +1 408 555 9751
+roomnumber: 4612
+userpassword: ProxyRules
+ds-privilege-name: proxied-auth
+
 dn: ou=aci branch, o=ACI Tests, dc=example,dc=com
 objectclass: top
 objectclass: organizationalunit
diff --git a/opends/tests/functional-tests/shared/functions/ldap.xml b/opends/tests/functional-tests/shared/functions/ldap.xml
index c3c8c45..ab37579 100755
--- a/opends/tests/functional-tests/shared/functions/ldap.xml
+++ b/opends/tests/functional-tests/shared/functions/ldap.xml
@@ -290,6 +290,12 @@
         </function-arg-description>
         <function-arg-property name="type" value="string"/>
       </function-arg-def>
+      <function-arg-def name="dsProxyDN" type="optional">
+        <function-arg-description>
+          Directory Server Proxy DN
+        </function-arg-description>
+        <function-arg-property name="type" value="dn"/>
+      </function-arg-def>
       <function-arg-def name="dsScope" type="optional">
         <function-arg-description>
           The scope of the search operation
@@ -343,6 +349,9 @@
       <call function="'_ldapCommonArgs'"/>
       
       <script>      
+        if dsProxyDN:
+          STAFCmdParamsList.append('-Y "%s"' % dsProxyDN)          
+          
         if dsScope:          
           STAFCmdParamsList.append('-s %s' % dsScope)
           
diff --git a/opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml b/opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml
index 1010dc7..3c9b22d 100755
--- a/opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml
+++ b/opends/tests/functional-tests/testcases/aci/aci_bindtypes.xml
@@ -2337,6 +2337,741 @@
               </sequence>
             </testcase>
 
+            <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Bind Type Tests
+                #@TestName                  groupdn - selfwrite add member
+                #@TestIssue                 450
+                #@TestPurpose               Test behavior with groupdn - selfwrite add member
+                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
+                #@TestStep                  Admin adds selfwrite aci to the dn of the group
+                #@TestStep                  Client adds a user as himself to a group.
+                #@TestStep                  Client searches entry in the targeted branch dn as the new group member.
+                #@TestStep                  Client searches entry in a non-targeted branch dn as the new group member.
+                #@TestStep                  Remove  selfwrite aci.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client searches entry with the previously targeted branch dn.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldap operations, and
+                                            entry is returned only for step 3.
+            -->
+            <testcase name="'ACI: Bind Types: groupdn - selfwrite add member'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = 'add_groupdn_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, preamble adding aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <script>
+                    curr_aci_ldif_file = 'add_static_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, adding selfwrite aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'        : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'        : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'     : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, adding new static member'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'        : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'          : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'        : 'ACIRules' ,
+                    'entryToBeModified'     : '%s/aci/aci_bindtypes/add_new_member_static1.ldif' % (STAGED_DATA_DIR) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, user searching targeted entry with new group member'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'cn:' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, user searching in non-targeted branch with new group member'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=non-aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '0'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, admin deleting selfwrite aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_static_selfwrite.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn equals one static group, admin deleting aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_aci.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add member, user searching previously targeted entry'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'checktestStringNotPresent'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <call function="'testCase_Postamble'"/>
+    
+              </sequence>
+            </testcase>
+
+            <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Bind Type Tests
+                #@TestName                  groupdn - selfwrite delete member
+                #@TestIssue                 450
+                #@TestPurpose               Test behavior with groupdn - selfwrite delete member
+                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
+                #@TestStep                  Admin adds selfwrite aci to the dn of the group
+                #@TestStep                  Client deletes a user as himself from a group.
+                #@TestStep                  Remove  selfwrite aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldap operations and
+                                            entry returned in step 4.
+            -->
+            <testcase name="'ACI: Bind Types: groupdn - selfwrite delete member'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = 'add_groupdn_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, preamble adding aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <script>
+                    curr_aci_ldif_file = 'add_static_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, adding selfwrite aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, deleting old static member'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'        : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'          : 'uid=zyuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'        : 'ACIRules' ,
+                    'entryToBeModified'     : '%s/aci/aci_bindtypes/del_old_member_static2.ldif' % (STAGED_DATA_DIR) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, admin deleting selfwrite aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_static_selfwrite.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, user searching targeted entry with old group member'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'cn:' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, admin deleting aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_aci.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, user searching previously targeted entry'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'checktestStringNotPresent'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <call function="'testCase_Postamble'"/>
+    
+              </sequence>
+            </testcase>
+
+            <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Bind Type Tests
+                #@TestName                  groupdn - selfwrite replace member
+                #@TestIssue                 450
+                #@TestPurpose               Test behavior with groupdn - selfwrite replace member
+                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
+                #@TestStep                  Admin adds selfwrite aci to the dn of the group
+                #@TestStep                  Client replaces a user as himself from a group.
+                #@TestStep                  Remove  selfwrite aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldap operations,
+                                            50 for step 2, and the entry is returned in step 4.
+            -->
+            <testcase name="'ACI: Bind Types: groupdn - selfwrite replace member'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = 'add_groupdn_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, preamble adding aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <script>
+                    curr_aci_ldif_file = 'add_static_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, adding selfwrite aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite delete member, replacing old static member'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'        : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'          : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'        : 'ACIRules' ,
+                    'entryToBeModified'     : '%s/aci/aci_bindtypes/replace_member_static3.ldif' % (STAGED_DATA_DIR) }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, admin deleting selfwrite aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_static_selfwrite.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, user searching targeted entry with old group member'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'cn:' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, admin deleting aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_aci.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite replace member, user searching previously targeted entry'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'checktestStringNotPresent'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <call function="'testCase_Postamble'"/>
+    
+              </sequence>
+            </testcase>
+
+            <!---
+                Place test-specific test information here.
+                The tag, TestMarker, must be the same as the tag, TestSuiteName.
+                #@TestMarker                ACI Bind Type Tests
+                #@TestName                  groupdn - selfwrite add description
+                #@TestIssue                 450
+                #@TestPurpose               Test behavior with groupdn - selfwrite add description
+                #@TestPreamble              Admin adds an aci to the dn of one existing branch.
+                #@TestStep                  Admin adds selfwrite aci to the dn of the group
+                #@TestStep                  Client adds a description as a user as himself to a group.
+                #@TestStep                  Remove  selfwrite aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestStep                  Remove aci.
+                #@TestStep                  Client searches entry in the targeted branch dn as an old group member.
+                #@TestPostamble             none
+                #@TestResult                Success if OpenDS returns 0
+                                            for all ldap operations,
+                                            50 for step 2, and the entry is returned in step 4.
+            -->
+            <testcase name="'ACI: Bind Types: groupdn - selfwrite add description'">
+              <sequence>
+                <call function="'testCase_Preamble'"/>
+                          
+                <script>
+                    curr_aci_ldif_file = 'add_groupdn_selfwrite.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, preamble adding aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <script>
+                    curr_aci_ldif_file = 'add_static_selfwrite2.ldif'
+                    curr_aci=retrieve_aci('%s/aci/aci_bindtypes/%s' % (LOCAL_DATA_DIR,curr_aci_ldif_file));
+                </script>
+        
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, adding selfwrite aci,\n %s' % curr_aci
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/%s' % (STAGED_DATA_DIR,curr_aci_ldif_file) }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, add new description'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'        : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'          : 'uid=zuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'        : 'ACIRules' ,
+                    'entryToBeModified'     : '%s/aci/aci_bindtypes/add_new_description_static4.ldif' % (STAGED_DATA_DIR) }
+                </call>
+    
+                <if expr="RC != 50">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, admin deleting selfwrite aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_static_selfwrite2.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, user searching targeted entry with old group member'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <call function="'searchStringForSubstring'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'cn:' }
+                </call>
+                
+                <if expr="returnCode != '1'">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, admin deleting aci'
+                </message>
+    
+                <call function="'modifyEntry'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                    'entryToBeModified'   : '%s/aci/aci_bindtypes/del_aci.ldif' % STAGED_DATA_DIR }
+                </call>
+    
+                <if expr="RC != 0">
+                    <tcstatus result="'fail'"/>
+                </if>
+    
+                <message>
+                   'ACI: Bind Types: groupdn - selfwrite add description, user searching previously targeted entry'
+                </message>
+    
+                <call function="'SearchObject'">
+                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                    'dsInstanceDn'     : 'uid=cuser,ou=people,o=ACI Tests,dc=example,dc=com' ,
+                    'dsInstancePswd'   : 'ACIRules' ,
+                    'dsBaseDN'         : 'uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests,dc=example,dc=com' ,
+                    'dsFilter'         : 'objectclass=*'  ,
+                    'attributes'       : 'cn sn uid'}
+                </call>
+    
+                <script> 
+                 returnString = STAXResult[0][1]
+                </script> 
+    
+                <call function="'checktestStringNotPresent'">
+                    { 'returnString'       : returnString ,
+                      'testString'         : 'dn: uid=scarter,ou=People,ou=aci branch,o=Bind Type Tests,o=ACI Tests' }
+                </call>
+                
+                <call function="'testCase_Postamble'"/>
+    
+              </sequence>
+            </testcase>
 
 <!-- userattr tests -->          
             <!---

--
Gitblit v1.10.0