mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user