1 from forum.settings.base import Setting, SettingSet
2 from django.utils.translation import ugettext_lazy as _
4 LDAP_SET = SettingSet('ldap', _('LDAP settings'), _("LDAP configuration for OSQA"), 4)
6 LDAP_SERVER = Setting('LDAP_SERVER', '', LDAP_SET, dict(
7 label = _("LDAP Server"),
8 help_text = _("The hostname of your organization's LDAP server"),
11 LDAP_USE_TLS = Setting('LDAP_USE_TLS', False, LDAP_SET, dict(
13 help_text = _("Check to use TLS"),
16 LDAP_BIND_DN = Setting('LDAP_BIND_DN', '', LDAP_SET, dict(
17 label = _("DN for binding"),
18 help_text = _("Enter the DN to use to bind to the LDAP server (leave blank for anonymous bind)"),
21 LDAP_BIND_SECRET = Setting('LDAP_BIND_SECRET', '', LDAP_SET, dict(
22 label = _("Password for binding"),
23 help_text = _("Password for binding DN above"),
26 LDAP_BASE_DN = Setting('LDAP_BASE_DN', '', LDAP_SET, dict(
28 help_text = _("The Base DN used to search for users"),
31 LDAP_USER_MASK = Setting('LDAP_USER_MASK', 'UID=%s', LDAP_SET, dict(
32 label = _("User Mask"),
33 help_text = _("The mask to query for a User"),
36 LDAP_UID = Setting('LDAP_UID', 'uid', LDAP_SET, dict(
37 label = _("uid field"),
38 help_text = _("ldap field that holds the uid (sAMAccountName in AD)"),
41 LDAP_NAME = Setting('LDAP_NAME', 'cn', LDAP_SET, dict(
42 label = _("Name field"),
43 help_text = _("ldap field that holds the full name (displayName in AD)"),
46 LDAP_DN = Setting('LDAP_DN', 'dn', LDAP_SET, dict(
47 label = _("DN field"),
48 help_text = _("ldap field that holds the distinguished name (distinguishedName in AD)"),
51 LDAP_MAIL = Setting('LDAP_MAIL', 'mail', LDAP_SET, dict(
52 label = _("email field"),
53 help_text = _("ldap field that holds the email"),