Changeset View
Changeset View
Standalone View
Standalone View
pykolab/auth/__init__.py
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | def connect(self, domain=None): | ||||
) | ) | ||||
# Get the actual authentication and authorization backend. | # Get the actual authentication and authorization backend. | ||||
if conf.get(section, 'auth_mechanism') == 'ldap': | if conf.get(section, 'auth_mechanism') == 'ldap': | ||||
log.debug(_("Starting LDAP..."), level=8) | log.debug(_("Starting LDAP..."), level=8) | ||||
from pykolab.auth.ldap import LDAP | from pykolab.auth.ldap import LDAP | ||||
self._auth = LDAP(self.domain) | self._auth = LDAP(self.domain) | ||||
elif conf.get(section, 'auth_mechanism') == 'plesk': | |||||
log.debug(_("Starting Plesk..."), level=8) | |||||
from pykolab.auth import plesk | |||||
self._auth = plesk.Plesk(self.domain) | |||||
# elif conf.get(section, 'auth_mechanism') == 'sql': | # elif conf.get(section, 'auth_mechanism') == 'sql': | ||||
# from .sql import SQL | # from .sql import SQL | ||||
# self._auth = SQL(self.domain) | # self._auth = SQL(self.domain) | ||||
else: | else: | ||||
log.debug(_("Starting LDAP..."), level=8) | log.debug(_("Starting LDAP..."), level=8) | ||||
from pykolab.auth.ldap import LDAP | from pykolab.auth.ldap import LDAP | ||||
self._auth = LDAP(self.domain) | self._auth = LDAP(self.domain) | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |