From a86c73a6ac39ac4badb53393b61da60a45d6f408 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Tue, 19 Jan 2010 01:48:40 +0100 Subject: [PATCH] Ajout de la base de test sur vo darcs-hash:20100119004840-8fbb1-bba9c686391e37531780e8d9749baf2784f2215c.gz --- Bundler/ldap.xml | 4 +++- Metadata/groups.xml | 10 +++++++++- Python/etc/ldap/slapd.conf | 5 ++++- etc/python/ldap.py | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Bundler/ldap.xml b/Bundler/ldap.xml index a0d0334..1106772 100644 --- a/Bundler/ldap.xml +++ b/Bundler/ldap.xml @@ -2,8 +2,10 @@ - + + + diff --git a/Metadata/groups.xml b/Metadata/groups.xml index ac5c6cd..e87cc1d 100644 --- a/Metadata/groups.xml +++ b/Metadata/groups.xml @@ -127,7 +127,8 @@ - + + + + + + + diff --git a/Python/etc/ldap/slapd.conf b/Python/etc/ldap/slapd.conf index 3e8232e..a716875 100644 --- a/Python/etc/ldap/slapd.conf +++ b/Python/etc/ldap/slapd.conf @@ -110,7 +110,10 @@ else: @# s'authentifier avec anonymement @ @access to attrs=userPassword -@ by dn.regex="cn=admin,dc=crans,dc=org" write + +if not has("db-replicat-test"): + @ by dn.regex="cn=admin,dc=crans,dc=org" write + @ by dn.regex="cn=replica,dc=crans,dc=org" write @ by dn.regex="cn=dovecot,dc=crans,dc=org" read @ by anonymous auth diff --git a/etc/python/ldap.py b/etc/python/ldap.py index d594a1a..3ce7f8c 100644 --- a/etc/python/ldap.py +++ b/etc/python/ldap.py @@ -9,7 +9,7 @@ include("ip") # ldap_socket à l'adresse physique de la base (donc physique si possible) # Le serveur qui gère la base de données -if has("db-server"): +if has("db-server") and not has("db-replicat-test"): # Pour ceux qui ont la base ou une copie en locale # on regarde dans celle-ci ldap_host = "ldap://127.0.0.1/"