Projet

Général

Profil

« Précédent | Suivant » 

Révision 5294fd40

Ajouté par Jérôme Schneider il y a plus de 9 ans

backends: implement a new ldap storage backend

Closes #5425

Voir les différences:

mandaye/skel/example.module/config.py
30 30
# dialect+driver://username:password@host:port/database
31 31
db_url = config.get('database', 'url')
32 32

  
33
## LDAP Backend config
34
ldap_url = config.get('ldap', 'url')
35
ldap_bind_dn = config.get('ldap', 'base_dn')
36
ldap_bind_password = config.get('ldap', 'bind_password')
37
ldap_base_dn = config.get('ldap', 'base_dn')
38

  
33 39
debug = config.getboolean('debug', 'debug')
34 40

  
35 41
# Log configuration
......
137 143
# Authentic 2 auto connection
138 144
a2_auto_connection = config.getboolean('mandaye', 'a2_auto_connection')
139 145

  
140
# Choose storage
141
# Only mandaye.backends.sql at the moment
146
# Choose storage (sql or ldap)
142 147
if config.get('mandaye', 'storage_backend') == 'sql':
143 148
    storage_backend = "mandaye.backends.sql"
149
elif config.get('mandaye', 'storage_backend') == 'ldap':
150
    storage_backend = "mandaye.backends.ldap_back"
144 151
else:
145
    ImproperlyConfigured('Storage backend must be sql')
152
    ImproperlyConfigured('Storage backend must be sql or ldap')
146 153

  
147 154
# Encrypt service provider passwords with a secret
148 155
# You should install pycypto to use this feature

Formats disponibles : Unified diff