Return nsaccountlock in user-add as boolean

The `nsaccountlock` attribute was being returned as a
list of string ("TRUE"/"FALSE") instead of a boolean.
Use the convert function used in `user-find` and `user-mod`
for consistency, since these commands return the parameter as a boolean.

Fixes: https://pagure.io/freeipa/issue/8743
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Antonio Torres 2021-03-11 13:22:24 +01:00 committed by Alexander Bokovoy
parent 5984f14426
commit 45de2d7f39

View File

@ -545,6 +545,8 @@ class baseuser_add(LDAPCreate):
self.obj.convert_usercertificate_post(entry_attrs, **options) self.obj.convert_usercertificate_post(entry_attrs, **options)
self.obj.get_password_attributes(ldap, dn, entry_attrs) self.obj.get_password_attributes(ldap, dn, entry_attrs)
convert_sshpubkey_post(entry_attrs) convert_sshpubkey_post(entry_attrs)
if 'nsaccountlock' in entry_attrs:
convert_nsaccountlock(entry_attrs)
radius_dn2pk(self.api, entry_attrs) radius_dn2pk(self.api, entry_attrs)