Password check in sane place.

This commit is contained in:
nikolark committed 2011-10-17 02:27:54 +02:00
1 parent 2bdaf32e87
commit 63243efd4c
2 files changed
+9 -5

No files matched your search

-5
View File
@@ -1,8 +1,6 @@
from ldapdb.models.fields import CharField, ImageField, IntegerField, ListField
import ldapdb.models
import passwd
from django.core.validators import MinLengthValidator
from validators import PasswordValidator
class LdapUser(ldapdb.models.Model):
"""
Class for representing an LDAP user entry.
@@ -33,9 +31,6 @@ class LdapUser(ldapdb.models.Model):
if raw_password is None:
self.password = "!"
else:
# Validation here?
MinLengthValidator(8)(raw_password)
PasswordValidator(raw_password)
self.password = passwd.ldap_create(raw_password)
self.save()