https://fedorahosted.org/freeipa/ticket/5038
I reworded the error message to keep the same format as stageuser-add and user-add.
Patch attached. -- Martin Basti
From 108b44354e049b4a1de009e144e2b645656bfc0e Mon Sep 17 00:00:00 2001 From: Martin Basti <mba...@redhat.com> Date: Fri, 10 Jul 2015 14:47:59 +0200 Subject: [PATCH] Stageusedr-activate: show username instead of DN If activate user already exists, show name of this user in error message instead of user DN. Error message reworder to keep the same format as stageuser-add, user-add. https://fedorahosted.org/freeipa/ticket/5038 --- ipalib/plugins/stageuser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py index 35e636ded4474b00ad635c60340aaf66e6b41752..6cbc8f4ab07f2c1172f2b2c45bfe8f30a74938b3 100644 --- a/ipalib/plugins/stageuser.py +++ b/ipalib/plugins/stageuser.py @@ -682,8 +682,9 @@ class stageuser_activate(LDAPQuery): active_dn, ['dn'] ) assert isinstance(staging_dn, DN) - raise errors.DuplicateEntry(message=_('Active user %(user)s already exists') % dict( - user=test_entry_attrs.dn)) + raise errors.DuplicateEntry( + message=_('active user with name "%(user)s" already exists') % + dict(user=args[-1])) except errors.NotFound: pass -- 2.4.3
-- 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