Error message while adding idrange with untrusted domain

While trying to add idrange with untrusted domain name error
message is misleading.

Changing the error message to:
invalid 'ID Range setup':Specified trusted domain
name could not be found.

Resolves: https://pagure.io/freeipa/issue/5078
Reviewed-By: Alexander Koksharov <akokshar@redhat.com>
This commit is contained in:
amitkuma
2018-03-12 20:23:36 +05:30
committed by Christian Heimes
parent bffcef6bbd
commit a3060b5238

View File

@@ -424,10 +424,10 @@ class idrange_add(LDAPCreate):
if sid is not None:
entry_attrs['ipanttrusteddomainsid'] = sid
else:
raise errors.ValidationError(name='ID Range setup',
error=_('SID for the specified trusted domain name could '
'not be found. Please specify the SID directly '
'using dom-sid option.'))
raise errors.ValidationError(
name='ID Range setup',
error=_('Specified trusted domain name could not be '
'found.'))
# ipaNTTrustedDomainSID attribute set, this is AD Trusted domain range
if is_set('ipanttrusteddomainsid'):