https://fedorahosted.org/freeipa/ticket/5481
Patch attached.
From 4ba6a6daf58d751fbb95e23f785e6b4861e21079 Mon Sep 17 00:00:00 2001
From: Martin Basti
Date: Mon, 7 Mar 2016 12:15:58 +0100
Subject: [PATCH] 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
---
ipalib/plugins/stageuser.py | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py
index a134e686bc86c96cca0620c36752933906205770..7e61e7e7519ccd9ae8d148df23f207ce3112bd1e 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
+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 dict(result=result_entry,
-summary=unicode(_('Stage user %s activated' % staging_dn[0].value)),
-value=pkey_to_value(args[-1], options))
+return result
@register()
--
2.5.0
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code