diff options
| author | Martin Basti <mbasti@redhat.com> | 2016-03-07 12:15:58 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-03-16 09:09:36 +0100 |
| commit | 4871cb5b549042f383ee883e527e773c0abe9d87 (patch) | |
| tree | 37f393c3eb6d9831e7bb33f75bf77625a2bc507b | |
| parent | 8290d4b4cba8cf0b9ca517f7f09db2ee81606899 (diff) | |
stageuser-activate: Normalize manager value
Manager(s) were returned as list od DN, this commit fixes behavior and
managers are returned as list of logins.
https://fedorahosted.org/freeipa/ticket/5481
Reviewed-By: David Kupka <dkupka@redhat.com>
| -rw-r--r-- | ipalib/plugins/stageuser.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py index 77660c0f2..877e6489b 100644 --- a/ipalib/plugins/stageuser.py +++ b/ipalib/plugins/stageuser.py @@ -28,9 +28,7 @@ from ipalib.plugable import Registry from ipalib.plugins.baseldap import ( LDAPCreate, LDAPQuery, - DN, - entry_to_dict, - pkey_to_value) + DN) from ipalib.plugins import baseldap from ipalib.plugins.baseuser import ( baseuser, @@ -712,13 +710,16 @@ class stageuser_activate(LDAPQuery): pass # Now retrieve the activated entry - result_entry = self._exc_wrapper(args, options, ldap.get_entry)(active_dn) - result_entry = entry_to_dict(result_entry, **options) - result_entry['dn'] = active_dn - - return dict(result=result_entry, - summary=unicode(_('Stage user %s activated' % staging_dn[0].value)), - value=pkey_to_value(args[-1], options)) + result = self.api.Command.user_show( + args[-1], + all=options.get('all', False), + raw=options.get('raw', False), + version=options.get('version'), + ) + result['summary'] = unicode( + _('Stage user %s activated' % staging_dn[0].value)) + + return result @register() |
