summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-08-10 13:22:50 -0400
committerRob Crittenden <rcritten@redhat.com>2010-08-19 10:49:42 -0400
commite225ad4341b8f91b0aa3d4be3f93b9082716828e (patch)
treef6045e821219e68e9683df6b01f25c7d732f4758 /tests/test_xmlrpc
parent897b296a694224f9d00a4bfcc80f818c858fbfb5 (diff)
downloadfreeipa-e225ad4341b8f91b0aa3d4be3f93b9082716828e.tar.gz
freeipa-e225ad4341b8f91b0aa3d4be3f93b9082716828e.tar.xz
freeipa-e225ad4341b8f91b0aa3d4be3f93b9082716828e.zip
Add support for ldap:///self bind rules
This is added mainly so the self service rules can be updated without resorting to ldapmodify. ticket 80
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r--tests/test_xmlrpc/test_aci_plugin.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_aci_plugin.py b/tests/test_xmlrpc/test_aci_plugin.py
index ddf2ed63a..e05e53a5a 100644
--- a/tests/test_xmlrpc/test_aci_plugin.py
+++ b/tests/test_xmlrpc/test_aci_plugin.py
@@ -29,11 +29,14 @@ from xmlrpc_test import Declarative, fuzzy_digits, fuzzy_uuid
aci1=u'test1'
taskgroup = u'testtaskgroup'
+aci2=u'selftest1'
+
class test_aci(Declarative):
cleanup_commands = [
('aci_del', [aci1], {}),
+ ('aci_del', [aci2], {}),
]
tests = [
@@ -219,4 +222,38 @@ class test_aci(Declarative):
),
+ dict(
+ desc='Create %r' % aci2,
+ command=(
+ 'aci_add', [aci2], dict(permissions=u'write', attrs=(u'givenName',u'sn',u'cn'), selfaci=True)
+ ),
+ expected=dict(
+ value=aci2,
+ summary=u'Created ACI "%s"' % aci2,
+ result=u'(targetattr = "givenName || sn || cn")(version 3.0;acl "selftest1";allow (write) userdn = "ldap:///self";)'),
+ ),
+
+
+ dict(
+ desc='Update attributes in %r' % aci2,
+ command=(
+ 'aci_mod', [aci2], dict(attrs=(u'givenName',u'sn',u'cn',u'uidNumber'))
+ ),
+ expected=dict(
+ value=aci2,
+ summary=u'Modified ACI "%s"' % aci2,
+ result=u'(targetattr = "givenName || sn || cn || uidNumber")(version 3.0;acl "selftest1";allow (write) userdn = "ldap:///self";)'
+ ),
+ ),
+
+
+ dict(
+ desc='Update self ACI with a taskgroup %r' % aci2,
+ command=(
+ 'aci_mod', [aci2], dict(attrs=(u'givenName',u'sn',u'cn',u'uidNumber'), taskgroup=taskgroup)
+ ),
+ expected=errors.ValidationError(name='target', error='group, taskgroup and self are mutually exclusive'),
+ ),
+
+
]