diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-06-24 15:18:34 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-07-02 13:33:03 -0400 |
commit | 57123f2a9993be9e9ea83c1203f0670e67986de9 (patch) | |
tree | 295b2cc697f4d4eee150a9f647673a4df772141e /ipalib/plugins/taskgroup.py | |
parent | 341a47f5a3786f96602bcc0c0ecd12aa86f5b9c1 (diff) | |
download | freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.gz freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.tar.xz freeipa-57123f2a9993be9e9ea83c1203f0670e67986de9.zip |
Fix minor bugs, typos, etc. discovered by unit tests in plugins.
Diffstat (limited to 'ipalib/plugins/taskgroup.py')
-rw-r--r-- | ipalib/plugins/taskgroup.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/plugins/taskgroup.py b/ipalib/plugins/taskgroup.py index d22ac8229..380f18618 100644 --- a/ipalib/plugins/taskgroup.py +++ b/ipalib/plugins/taskgroup.py @@ -107,7 +107,9 @@ class taskgroup_add_member(basegroup_add_member): """ assert self.container ldap = self.api.Backend.ldap2 - dn = get_dn_by_attr(ldap, 'cn', cn, self.filter_class, self.container) + (dn, entry_attrs) = ldap.find_entry_by_attr( + 'cn', cn, self.filter_class, [''], self.container + ) to_add = [] add_failed = [] completed = 0 @@ -133,7 +135,7 @@ class taskgroup_add_member(basegroup_add_member): members = kw.get('rolegroups', []) (to_add, add_failed) = find_members( ldap, add_failed, members, 'cn', self.filter_class, - self.api.env.container_rolegroups + self.api.env.container_rolegroup ) (completed, add_failed) = add_members( ldap, completed, to_add, add_failed, dn, 'member' @@ -169,7 +171,9 @@ class taskgroup_del_member(basegroup_del_member): """ assert self.container ldap = self.api.Backend.ldap2 - dn = get_dn_by_attr(ldap, 'cn', cn, self.filter_class, self.container) + (dn, entry_attrs) = ldap.find_entry_by_attr( + 'cn', cn, self.filter_class, [''], self.container + ) to_remove = [] remove_failed = [] completed = 0 @@ -195,7 +199,7 @@ class taskgroup_del_member(basegroup_del_member): members = kw.get('rolegroups', []) (to_remove, remove_failed) = find_members( ldap, remove_failed, members, 'cn', self.filter_class, - self.api.env.container_rolegroups + self.api.env.container_rolegroup ) (completed, remove_failed) = del_members( ldap, completed, to_remove, remove_failed, dn, 'member' |