|
|
@ -67,7 +67,9 @@ class LILiK_USER(object): |
|
|
|
diff = utils.DictDiffer(new_lilik_user, self.__dict__) |
|
|
|
modifiers = {user_cn: {}} |
|
|
|
if 'userPassword' in diff.added() and new_lilik_user['userPassword']: |
|
|
|
modifiers[user_cn]['userPassword'] = [(ldap3.MODIFY_REPLACE, [new_lilik_user['userPassword']])] #TODO add hash encryption? |
|
|
|
action = ldap3.MODIFY_REPLACE |
|
|
|
hashed = ldap3.utils.hashed(HASHED_SALTED_SHA, new_lilik_user['userPassword']) |
|
|
|
modifiers[user_cn]['userPassword'] = [(action, [hashed])] |
|
|
|
for changed in diff.changed(): |
|
|
|
if changed == 'services': |
|
|
|
services_diff = utils.DictDiffer(self.__dict__[changed], new_lilik_user[changed]) |
|
|
|