Pour viter les problmes d'authentification, on ouvre une nouvelle
connexion la base LDAP chaque authentification. darcs-hash:20061213181047-68412-f41c971d417a0374945e56b459fc702cb99ec560.gz
This commit is contained in:
parent
e6782d03a4
commit
9492f584c6
1 changed files with 5 additions and 7 deletions
|
@ -74,14 +74,14 @@ if (options.port):
|
||||||
cherrypy.config.update(settings)
|
cherrypy.config.update(settings)
|
||||||
|
|
||||||
|
|
||||||
# import du crans_ldap qu'il va bien
|
# import du CransLdap qu'il va bien (on utilise CransLdap et non crans_ldap car on veut
|
||||||
|
# forcer l'ouverture d'une nouvelle connexion à chaque login)
|
||||||
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
||||||
from ldap_crans_test import crans_ldap
|
from ldap_crans_test import CransLdap
|
||||||
cherrypy.log("settings : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"], "LDAP")
|
cherrypy.log("settings : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"], "LDAP")
|
||||||
else:
|
else:
|
||||||
from ldap_crans import crans_ldap
|
from ldap_crans import CransLdap
|
||||||
cherrypy.log("settings : unsing prod ldap : env=" + cherrypy.config.configMap["global"]["server.environment"], "LDAP")
|
cherrypy.log("settings : unsing prod ldap : env=" + cherrypy.config.configMap["global"]["server.environment"], "LDAP")
|
||||||
cherrypy.config.update({'global':{'crans_ldap':crans_ldap()}})
|
|
||||||
|
|
||||||
# ######################################################## #
|
# ######################################################## #
|
||||||
# FILTRES MAISON #
|
# FILTRES MAISON #
|
||||||
|
@ -95,11 +95,9 @@ from crans.mail import quickSend
|
||||||
# SERVER #
|
# SERVER #
|
||||||
# ######################################################## #
|
# ######################################################## #
|
||||||
class Intranet:
|
class Intranet:
|
||||||
__ldap = None
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
from pages import monCompte, impression, factures, digicode, mesmachines
|
from pages import monCompte, impression, factures, digicode, mesmachines
|
||||||
from pages import gestionFactures
|
from pages import gestionFactures
|
||||||
self.__ldap = cherrypy.config.configMap["global"]["crans_ldap"]
|
|
||||||
|
|
||||||
# liste des modules disponibles
|
# liste des modules disponibles
|
||||||
self.monCompte = monCompte.monCompte()
|
self.monCompte = monCompte.monCompte()
|
||||||
|
@ -233,7 +231,7 @@ def verifLogin(login = '', password = ''):
|
||||||
message = None
|
message = None
|
||||||
try:
|
try:
|
||||||
if login != '' and password != '':
|
if login != '' and password != '':
|
||||||
cherrypy.session['LDAP'] = crans_ldap()
|
cherrypy.session['LDAP'] = CransLdap()
|
||||||
LDAP = cherrypy.session['LDAP']
|
LDAP = cherrypy.session['LDAP']
|
||||||
adh = LDAP.search('uid=' + login)['adherent'][0]
|
adh = LDAP.search('uid=' + login)['adherent'][0]
|
||||||
if adh.checkPassword(password):
|
if adh.checkPassword(password):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue