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>
This commit is contained in:
1 parent
18d417e981
commit
c144ea6fef
1 file changed
+3
-2
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user