Merge branch 'issue/1/user-password-update' into 'master'
Issue/1/user password update See merge request ungleich-public/dynamicweb!748
This commit is contained in:
commit
79e96715b2
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import hashlib
|
||||||
import random
|
import random
|
||||||
import ldap3
|
import ldap3
|
||||||
import logging
|
import logging
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
@ -101,7 +102,7 @@ class LdapManager:
|
||||||
"uidNumber": [str(uidNumber)],
|
"uidNumber": [str(uidNumber)],
|
||||||
"gidNumber": [str(settings.LDAP_CUSTOMER_GROUP_ID)],
|
"gidNumber": [str(settings.LDAP_CUSTOMER_GROUP_ID)],
|
||||||
"loginShell": ["/bin/bash"],
|
"loginShell": ["/bin/bash"],
|
||||||
"homeDirectory": ["/home/{}".format(user).encode("utf-8")],
|
"homeDirectory": ["/home/{}".format(unicodedata.normalize('NFKD', user).encode('ascii','ignore'))],
|
||||||
"mail": email.encode("utf-8"),
|
"mail": email.encode("utf-8"),
|
||||||
"userPassword": [self._ssha_password(
|
"userPassword": [self._ssha_password(
|
||||||
password.encode("utf-8")
|
password.encode("utf-8")
|
||||||
|
|
Loading…
Reference in a new issue