summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2016-09-29 04:12:36 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2016-09-29 04:12:36 +0200
commit4e3153c5504e699784f9bf715d81ea4bc8a0fafe (patch)
treeabfee644848b0a690b741848ad39cf420390d66e
parent1117506db94edd09ca2438cb418039c1a20e1090 (diff)
downloadweb-4e3153c5504e699784f9bf715d81ea4bc8a0fafe.tar.gz
web-4e3153c5504e699784f9bf715d81ea4bc8a0fafe.tar.bz2
web-4e3153c5504e699784f9bf715d81ea4bc8a0fafe.zip
models: Remove unused attribute
-rw-r--r--accounts/backend/user/ldap.py3
-rw-r--r--accounts/models.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/accounts/backend/user/ldap.py b/accounts/backend/user/ldap.py
index ed7b792..6ab02c6 100644
--- a/accounts/backend/user/ldap.py
+++ b/accounts/backend/user/ldap.py
@@ -64,7 +64,7 @@ class LdapBackend(Backend):
if uid is None or mail is None:
raise NoSuchUserError("User not found")
- return Account(uid, mail, services, user_dn, password)
+ return Account(uid, mail, services, password)
def find(self, filters=None, wildcard=False):
"""
@@ -108,7 +108,6 @@ class LdapBackend(Backend):
}
conn.add(user_dn, attributes=attrs)
- account.dn = user_dn
account.new_password_root = (None, account.password)
self._alter_passwords(conn, account)
diff --git a/accounts/models.py b/accounts/models.py
index 0fdc1f7..6bb4bf4 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -12,10 +12,9 @@ class Account(UserMixin):
"""
_ready = False
- def __init__(self, uid, mail, services=None, dn=None, password=None):
+ def __init__(self, uid, mail, services=None, password=None):
self.uid = uid.encode('utf8') if isinstance(uid, unicode) else uid
self.services = list() if services is None else services
- self.dn = dn
self.password = password.encode('utf8') if isinstance(password, unicode) else password
self.new_password_root = None
self.new_password_services = {}