summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/stageuser.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-07-10 14:47:59 +0200
committerJan Cholasta <jcholast@redhat.com>2015-07-15 07:08:02 +0000
commitc144ea6feff2a712e4862f4e3c2fa882309da5b8 (patch)
tree6241a9d982f0ed4a834a9f5a2152a0d7a32c20b4 /ipalib/plugins/stageuser.py
parent18d417e981045830f5dd359cf912caf3b0b9e6d3 (diff)
downloadfreeipa-c144ea6feff2a712e4862f4e3c2fa882309da5b8.tar.gz
freeipa-c144ea6feff2a712e4862f4e3c2fa882309da5b8.tar.xz
freeipa-c144ea6feff2a712e4862f4e3c2fa882309da5b8.zip
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 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/plugins/stageuser.py')
-rw-r--r--ipalib/plugins/stageuser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py
index 35e636ded..6cbc8f4ab 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