From 39153f9b8a9af7537cd594e5d708abecef9217c8 Mon Sep 17 00:00:00 2001 From: Antonio Torres Date: Thu, 11 Mar 2021 13:22:24 +0100 Subject: [PATCH] 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 Reviewed-By: Rob Crittenden --- ipaserver/plugins/baseuser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ipaserver/plugins/baseuser.py b/ipaserver/plugins/baseuser.py index e1b7763f0..ae16a978a 100644 --- a/ipaserver/plugins/baseuser.py +++ b/ipaserver/plugins/baseuser.py @@ -545,6 +545,8 @@ class baseuser_add(LDAPCreate): self.obj.convert_usercertificate_post(entry_attrs, **options) self.obj.get_password_attributes(ldap, dn, entry_attrs) convert_sshpubkey_post(entry_attrs) + if 'nsaccountlock' in entry_attrs: + convert_nsaccountlock(entry_attrs) radius_dn2pk(self.api, entry_attrs)