summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/sudorule.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2014-03-27 14:04:00 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-04-18 14:59:20 +0200
commit4314d02fbf9ef1cb9543ecf76a8d22e79d250214 (patch)
tree8c6ac601e881712e8cf7c25fce420026a3762553 /ipalib/plugins/sudorule.py
parentc644b47492e22370bc71f57e5ac46b50f9b4e247 (diff)
downloadfreeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.tar.gz
freeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.tar.xz
freeipa-4314d02fbf9ef1cb9543ecf76a8d22e79d250214.zip
Allow primary keys to use different type than unicode.
Also return list of primary keys instead of a single unicode CSV value from LDAPDelete-based commands. This introduces a new capability 'primary_key_types' for backward compatibility with old clients. Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib/plugins/sudorule.py')
-rw-r--r--ipalib/plugins/sudorule.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index 16611aede..627b4b975 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -699,7 +699,7 @@ class sudorule_add_option(LDAPQuery):
entry_attrs = entry_to_dict(entry_attrs, **options)
- return dict(result=entry_attrs, value=cn)
+ return dict(result=entry_attrs, value=pkey_to_value(cn, options))
def output_for_cli(self, textui, result, cn, **options):
textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \
@@ -755,7 +755,7 @@ class sudorule_remove_option(LDAPQuery):
entry_attrs = entry_to_dict(entry_attrs, **options)
- return dict(result=entry_attrs, value=cn)
+ return dict(result=entry_attrs, value=pkey_to_value(cn, options))
def output_for_cli(self, textui, result, cn, **options):
textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \