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>
This commit is contained in:
Jan Cholasta
2014-03-27 14:04:00 +01:00
committed by Petr Viktorin
parent c644b47492
commit 4314d02fbf
46 changed files with 538 additions and 447 deletions

View File

@@ -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"') % \