8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

fix buggy import which triggers AUTH_USER_MODEL refers to model 'users.User' that has not been installed

This commit is contained in:
Hugo Levy-Falk 2019-09-04 21:59:50 +02:00 committed by root
parent 7f07b1ed48
commit 20de9a45d9

View file

@ -78,7 +78,6 @@ import ldapdb.models
import ldapdb.models.fields import ldapdb.models.fields
from re2o.settings import LDAP, GID_RANGES, UID_RANGES from re2o.settings import LDAP, GID_RANGES, UID_RANGES
from re2o.login import hashNT
from re2o.field_permissions import FieldPermissionModelMixin from re2o.field_permissions import FieldPermissionModelMixin
from re2o.mixins import AclMixin, RevMixin from re2o.mixins import AclMixin, RevMixin
from re2o.base import smtp_check from re2o.base import smtp_check
@ -817,6 +816,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
def set_password(self, password): def set_password(self, password):
""" A utiliser de préférence, set le password en hash courrant et """ A utiliser de préférence, set le password en hash courrant et
dans la version ntlm""" dans la version ntlm"""
from re2o.login import hashNT
super().set_password(password) super().set_password(password)
self.pwd_ntlm = hashNT(password) self.pwd_ntlm = hashNT(password)
return return