import urllib
from misc import Object
-from settings import Settings
class Accounts(Object):
- @property
- def settings(self):
- return Settings()
-
def __init__(self, backend):
Object.__init__(self, backend)
self.__db = None
@property
def search_base(self):
- return Settings().get("ldap_search_base")
+ return self.settings.get("ldap_search_base")
@property
def db(self):
bind_dn = self.settings.get("ldap_bind_dn")
if bind_dn:
- bind_pw = self.settings.get("ldap_bind_pw")
+ bind_pw = self.settings.get("ldap_bind_pw", "")
self.__db.simple_bind(bind_dn, bind_pw)