URL: https://github.com/freeipa/freeipa/pull/521
Author: redhatrises
 Title: #521: Add nsaccountlock to user attributes when a new user is created
Action: opened

PR body:
This adds a the `nsaccountlock` attribute to a user upon account creation. This 
addresses newly created accounts; however, it does not address the issue of 
existing accounts. If `nsaccountlock` does not exist for a user, `ipa user-find 
--disabled=False` should return `Accounts disabled: False`. 

So, the question is how to deal with `nsaccountlock` missing in existing user 
accounts? I am not sure how to extend the framework to return `Accounts 
disabled: False` if `nsaccountlock` is NoneType. 

For more info, see @MartinBasti's post merge comments in #444 

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/521/head:pr521
git checkout pr521
From a0111657d32a6429b84b7d26e2f2de579241da54 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Tue, 28 Feb 2017 13:52:07 -0700
Subject: [PATCH] Add nsaccountlock to user attributes when a new user is

 ipaserver/plugins/baseuser.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ipaserver/plugins/baseuser.py b/ipaserver/plugins/baseuser.py
index 75cf7d8..6295f87 100644
--- a/ipaserver/plugins/baseuser.py
+++ b/ipaserver/plugins/baseuser.py
@@ -466,6 +466,7 @@ def pre_common_callback(self, ldap, dn, entry_attrs, attrs_list, *keys,
         assert isinstance(dn, DN)
+        convert_nsaccountlock(entry_attrs)
     def post_common_callback(self, ldap, dn, entry_attrs, *keys, **options):
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to