summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/sudorule.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-01-31 11:19:13 +0100
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:46 +0100
commitbb36683c8480a68d54ef632daa0a4d6df9802187 (patch)
tree00c9652ad120eb4d3a0c3807025615ecbb0d03f1 /ipalib/plugins/sudorule.py
parent982b78277755a301e3baa1d4f2bd7e1663fb88a5 (diff)
downloadfreeipa.git-bb36683c8480a68d54ef632daa0a4d6df9802187.tar.gz
freeipa.git-bb36683c8480a68d54ef632daa0a4d6df9802187.tar.xz
freeipa.git-bb36683c8480a68d54ef632daa0a4d6df9802187.zip
Use the dn attribute of LDAPEntry to set/get DNs of entries.
Convert all code that uses the 'dn' key of LDAPEntry for this to use the dn attribute instead.
Diffstat (limited to 'ipalib/plugins/sudorule.py')
-rw-r--r--ipalib/plugins/sudorule.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index a453dcab..8eea7732 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -642,7 +642,9 @@ class sudorule_add_option(LDAPQuery):
dn, attrs_list, normalize=self.obj.normalize_dn
)
- return dict(result=dict(entry_attrs))
+ entry_attrs = entry_to_dict(entry_attrs, **options)
+
+ return dict(result=entry_attrs)
def output_for_cli(self, textui, result, cn, **options):
textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \
@@ -697,7 +699,9 @@ class sudorule_remove_option(LDAPQuery):
dn, attrs_list, normalize=self.obj.normalize_dn
)
- return dict(result=dict(entry_attrs))
+ entry_attrs = entry_to_dict(entry_attrs, **options)
+
+ return dict(result=entry_attrs)
def output_for_cli(self, textui, result, cn, **options):
textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \