diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-05-31 12:39:24 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-06-01 07:51:59 +0200 |
commit | 6ff5f28142c46bf5f08fef74c261f75e1baa9f66 (patch) | |
tree | 68d497483906af2844f2668747fcce360b409306 /tests/test_xmlrpc | |
parent | 0ca29fac9af4cd437a8536f28ffd25923ec3f8cd (diff) | |
download | freeipa-6ff5f28142c46bf5f08fef74c261f75e1baa9f66.tar.gz freeipa-6ff5f28142c46bf5f08fef74c261f75e1baa9f66.tar.xz freeipa-6ff5f28142c46bf5f08fef74c261f75e1baa9f66.zip |
permission-find missed some results with --pkey-only option
When permission-find post callback detected a --pkey-only option,
it just terminated. However, this way the results that could have
been added from aci_find matches were not included.
Fix the post callback to go through the entire matching process.
Also make sure that DNS permissions have a correct objectclass
(ipapermission), otherwise such objects are not matched by the
permission LDAP search.
https://fedorahosted.org/freeipa/ticket/2658
Diffstat (limited to 'tests/test_xmlrpc')
-rw-r--r-- | tests/test_xmlrpc/test_permission_plugin.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_permission_plugin.py b/tests/test_xmlrpc/test_permission_plugin.py index d8ff14903..6613c9bba 100644 --- a/tests/test_xmlrpc/test_permission_plugin.py +++ b/tests/test_xmlrpc/test_permission_plugin.py @@ -368,6 +368,25 @@ class test_permission(Declarative): dict( + desc='Search by ACI attribute with --pkey-only', + command=('permission_find', [], {'pkey_only': True, + 'attrs': [u'krbminpwdlife']}), + expected=dict( + count=1, + truncated=False, + summary=u'1 permission matched', + result=[ + { + 'dn': lambda x: DN(x) == DN(('cn','Modify Group Password Policy'), + api.env.container_permission,api.env.basedn), + 'cn': [u'Modify Group Password Policy'], + }, + ], + ), + ), + + + dict( desc='Search for %r' % privilege1, command=('privilege_find', [privilege1], {}), expected=dict( |