correction du bug de login (j'espre)
darcs-hash:20061117140933-f46e9-af7e3b0bf4126861a3e9f9c1eb09227c3c6535c7.gz
This commit is contained in:
parent
b488b68dcf
commit
4f3b212b2d
6 changed files with 80 additions and 86 deletions
|
@ -49,6 +49,7 @@ if (options.port):
|
||||||
cherrypy.config.update(settings)
|
cherrypy.config.update(settings)
|
||||||
|
|
||||||
|
|
||||||
|
# import du crans_ldap qu'il va bien
|
||||||
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 crans_ldap
|
||||||
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")
|
||||||
|
@ -122,20 +123,6 @@ class Intranet:
|
||||||
else:
|
else:
|
||||||
cherrypy._cputil._cp_on_http_error(status, message)
|
cherrypy._cputil._cp_on_http_error(status, message)
|
||||||
|
|
||||||
'''
|
|
||||||
def nounous(self):
|
|
||||||
return "coucou"
|
|
||||||
nounous.exposed= True
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
return {"quoi":cherrypy.request.path, "il_faut":cherrypy.config.configMap["/nounous"]["crans.droits"], "moi":cherrypy.session['droits']
|
|
||||||
}
|
|
||||||
test.exposed = True
|
|
||||||
|
|
||||||
def environment(self):
|
|
||||||
return cherrypy.config.configMap["global"]["server.environment"]
|
|
||||||
environment.exposed = True
|
|
||||||
'''
|
|
||||||
|
|
||||||
# ######################################################## #
|
# ######################################################## #
|
||||||
# LOGIN MAISON #
|
# LOGIN MAISON #
|
||||||
|
@ -145,35 +132,33 @@ class Intranet:
|
||||||
#
|
#
|
||||||
def login(from_page = '', login = None, password = '', error_msg=''):
|
def login(from_page = '', login = None, password = '', error_msg=''):
|
||||||
return {
|
return {
|
||||||
'template':'login',
|
'template':'login',
|
||||||
'values':{'login':login, 'password':password, 'from_page':from_page, 'message':error_msg},
|
'values':{'login':login, 'password':password, 'from_page':from_page, 'message':error_msg},
|
||||||
'standalone':True
|
'standalone':True
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
# methode qui verifie le login
|
# methode qui verifie le login
|
||||||
#
|
#
|
||||||
def verifLogin(login = '', password = ''):
|
def verifLogin(login = '', password = ''):
|
||||||
message = None
|
message = None
|
||||||
if login != '' and password != '':
|
|
||||||
try:
|
try:
|
||||||
globalLdap = cherrypy.config.configMap["global"]["crans_ldap"]
|
if login != '' and password != '':
|
||||||
adh =globalLdap.search('uid=' + login)['adherent'][0]
|
cherrypy.session['LDAP'] = crans_ldap()
|
||||||
|
LDAP = cherrypy.session['LDAP']
|
||||||
|
adh = LDAP.search('uid=' + login)['adherent'][0]
|
||||||
if adh.checkPassword(password):
|
if adh.checkPassword(password):
|
||||||
cherrypy.session['uid'] = login
|
cherrypy.session['uid'] = login
|
||||||
cherrypy.session['session_key'] = True
|
cherrypy.session['session_key'] = True
|
||||||
cherrypy.session['droits'] = adh.droits()
|
cherrypy.session['droits'] = adh.droits()
|
||||||
cherrypy.session['LDAP'] = crans_ldap()
|
|
||||||
|
|
||||||
cherrypy.log("User logged in : %s" % cherrypy.session['uid'], "LOGIN")
|
cherrypy.log("User logged in : %s" % cherrypy.session['uid'], "LOGIN")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
#print("bad password")
|
raise Exception, "Bad password"
|
||||||
message = u"L'authentification a echoué."
|
|
||||||
except Exception, e:
|
|
||||||
#print(e)
|
|
||||||
message = u"L'authentification a echoué."
|
|
||||||
else:
|
else:
|
||||||
#print("sth empty")
|
message = u"L'authentification a echoué."
|
||||||
|
raise Exception, "Empty string"
|
||||||
|
except Exception, e:
|
||||||
|
cherrypy.log("%s (login:%s)" % (str(e), login), "LOGIN", 1)
|
||||||
message = u"L'authentification a echoué."
|
message = u"L'authentification a echoué."
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: iso-8859-15 -*-
|
||||||
# ##################################################################################################### #
|
# ##################################################################################################### #
|
||||||
# Factures #
|
# Factures
|
||||||
# ##################################################################################################### #
|
# ##################################################################################################### #
|
||||||
# Description: #
|
# Description:
|
||||||
# Affiche la liste des factures et l'historique de débits/crédits de l'adhérent. #
|
# Affiche la liste des factures et l'historique de débits/crédits de l'adhérent.
|
||||||
# Informations: #
|
# Informations:
|
||||||
# #
|
#
|
||||||
# Pages: #
|
# Pages:
|
||||||
# index:liste des factures #
|
# index:liste des factures
|
||||||
# historique: historique des débits/crédits #
|
# historique: historique des débits/crédits
|
||||||
|
#
|
||||||
# ##################################################################################################### #
|
# ##################################################################################################### #
|
||||||
import cherrypy, sys, os, datetime
|
import cherrypy, sys, os, datetime
|
||||||
|
|
||||||
class root:
|
class root:
|
||||||
__ldap = None
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.__ldap = cherrypy.config.configMap["global"]["crans_ldap"]
|
|
||||||
|
|
||||||
def index(self, message = '', error = ''):
|
def index(self, message = '', error = ''):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
t = {}
|
t = {}
|
||||||
t['message'] = message
|
t['message'] = message
|
||||||
t['error'] = error
|
t['error'] = error
|
||||||
|
@ -58,7 +55,7 @@ class root:
|
||||||
index.exposed = True
|
index.exposed = True
|
||||||
|
|
||||||
def historique(self):
|
def historique(self):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
|
|
||||||
lst = [ x for x in adh.historique() if x.split(u' : ',1)[1].startswith(u'credit') or x.split(u' : ',1)[1].startswith(u'debit') ]
|
lst = [ x for x in adh.historique() if x.split(u' : ',1)[1].startswith(u'credit') or x.split(u' : ',1)[1].startswith(u'debit') ]
|
||||||
histLst = []
|
histLst = []
|
||||||
|
@ -84,7 +81,7 @@ class root:
|
||||||
def delFacture(self, no):
|
def delFacture(self, no):
|
||||||
try:
|
try:
|
||||||
# trrouver la factures
|
# trrouver la factures
|
||||||
fact = self.__ldap.search('fid=' + no, 'w')['facture'][0]
|
fact = cherrypy.session['LDAP'].search('fid=' + no, 'w')['facture'][0]
|
||||||
#verifier qu'elle appartient bien a l'adherent
|
#verifier qu'elle appartient bien a l'adherent
|
||||||
if not fact.proprietaire().mail() == cherrypy.session['uid']:
|
if not fact.proprietaire().mail() == cherrypy.session['uid']:
|
||||||
raise Exception, "Impossible de supprimer cette facture"
|
raise Exception, "Impossible de supprimer cette facture"
|
||||||
|
|
|
@ -19,6 +19,7 @@ class root:
|
||||||
#
|
#
|
||||||
def index(self, submit = None, fileList = None, newFile = None ):
|
def index(self, submit = None, fileList = None, newFile = None ):
|
||||||
data = {}
|
data = {}
|
||||||
|
# on efface un eventuel objet impression existant
|
||||||
cherrypy.session['impression'] = None
|
cherrypy.session['impression'] = None
|
||||||
if submit == "Envoyer":
|
if submit == "Envoyer":
|
||||||
try:
|
try:
|
||||||
|
@ -108,7 +109,7 @@ class root:
|
||||||
try:
|
try:
|
||||||
nouvPrix = cherrypy.session['impression'].changeSettings(papier=papier, couleurs=couleurs, agraphes=agrafes, recto_verso=recto_verso, copies=int(copies))
|
nouvPrix = cherrypy.session['impression'].changeSettings(papier=papier, couleurs=couleurs, agraphes=agrafes, recto_verso=recto_verso, copies=int(copies))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
cherrypy.log("changeSettings (erreur): %s" % str(e), 'IMPRESSION', 1)
|
cherrypy.log("changeSettings : %s" % str(e), 'IMPRESSION', 1)
|
||||||
return {"erreur":str(e)}
|
return {"erreur":str(e)}
|
||||||
return {'nouvPrix':nouvPrix}
|
return {'nouvPrix':nouvPrix}
|
||||||
changeSettings.exposed = True
|
changeSettings.exposed = True
|
||||||
|
@ -123,7 +124,7 @@ class root:
|
||||||
except crans.impression.SoldeInsuffisant:
|
except crans.impression.SoldeInsuffisant:
|
||||||
return {"SoldeInsuffisant":1}
|
return {"SoldeInsuffisant":1}
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
cherrypy.log("lancerImpression (erreur): %s" % str(e), 'IMPRESSION', 1)
|
cherrypy.log("lancerImpression : %s" % str(e), 'IMPRESSION', 1)
|
||||||
return {"erreur":str(e)}
|
return {"erreur":str(e)}
|
||||||
cherrypy.log("impression", 'IMPRESSION')
|
cherrypy.log("impression", 'IMPRESSION')
|
||||||
return {'code':str(crans.impression.digicode.gen_code(cherrypy.session['uid'])) + "#"}
|
return {'code':str(crans.impression.digicode.gen_code(cherrypy.session['uid'])) + "#"}
|
||||||
|
|
|
@ -1,29 +1,34 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: iso-8859-15 -*-
|
||||||
|
# ##################################################################################################### #
|
||||||
|
# Machines
|
||||||
|
# ##################################################################################################### #
|
||||||
|
# Description:
|
||||||
|
# Affiche la liste des machies, les infons sur une machine et permet des modifications
|
||||||
|
# Informations:
|
||||||
|
#
|
||||||
|
# Pages:
|
||||||
|
# index:liste des machines + le reste (AJAX)
|
||||||
|
#
|
||||||
|
# ##################################################################################################### #
|
||||||
import cherrypy, sys, os, datetime
|
import cherrypy, sys, os, datetime
|
||||||
from time import strftime, localtime, time
|
from time import strftime, localtime, time
|
||||||
# libraries crans
|
# libraries crans
|
||||||
sys.path.append('/usr/scripts/gestion/')
|
sys.path.append('/usr/scripts/gestion/')
|
||||||
from config_mail import MailConfig
|
|
||||||
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
||||||
from ldap_crans_test import *
|
from ldap_crans_test import *
|
||||||
# print("monCompte : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
# print("mesmachines : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
||||||
else:
|
else:
|
||||||
from ldap_crans import *
|
from ldap_crans import *
|
||||||
# print("monCompte : unsing prod ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
# print("mesmachines : unsing prod ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class root:
|
class root:
|
||||||
__ldap = None
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.__ldap = cherrypy.config.configMap["global"]["crans_ldap"]
|
|
||||||
|
|
||||||
|
|
||||||
def AJAXListeMachines(self):
|
def AJAXListeMachines(self):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
machines = []
|
machines = []
|
||||||
for une_machine in adh.machines():
|
for une_machine in adh.machines():
|
||||||
machineInfos = {}
|
machineInfos = {}
|
||||||
|
@ -46,11 +51,11 @@ class root:
|
||||||
|
|
||||||
def AJAXMachineInfo(self, mid):
|
def AJAXMachineInfo(self, mid):
|
||||||
try:
|
try:
|
||||||
machine = self.__ldap.search('mid=' + mid)['machine'][0]
|
machine = cherrypy.session['LDAP'].search('mid=' + mid)['machine'][0]
|
||||||
if machine.proprietaire().mail() != cherrypy.session['uid']:
|
if machine.proprietaire().mail() != cherrypy.session['uid']:
|
||||||
raise Exception
|
raise Exception
|
||||||
# zamok -> pour tester l'affichage des ports, des alias
|
# zamok -> pour tester l'affichage des ports, des alias
|
||||||
#machine = self.__ldap.search('mid=896')['machine'][0]
|
#machine = cherrypy.session['LDAP'].search('mid=896')['machine'][0]
|
||||||
machineInfos = {}
|
machineInfos = {}
|
||||||
# nom, mac, mid, ip
|
# nom, mac, mid, ip
|
||||||
machineInfos['nom'] = machine.nom()
|
machineInfos['nom'] = machine.nom()
|
||||||
|
@ -151,8 +156,8 @@ class root:
|
||||||
##########################
|
##########################
|
||||||
def AJAXChangerNom(self, mid, nouveauNom):
|
def AJAXChangerNom(self, mid, nouveauNom):
|
||||||
try:
|
try:
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
mach = self.__ldap.search('mid=' + mid, 'w')['machine'][0]
|
mach = cherrypy.session['LDAP'].search('mid=' + mid, 'w')['machine'][0]
|
||||||
# tester si c'est bien la machine de l'adherent
|
# tester si c'est bien la machine de l'adherent
|
||||||
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
||||||
del adh, mach
|
del adh, mach
|
||||||
|
@ -172,8 +177,8 @@ class root:
|
||||||
##########################
|
##########################
|
||||||
def AJAXchangerMAC(self, mid, nouvelleMAC):
|
def AJAXchangerMAC(self, mid, nouvelleMAC):
|
||||||
try:
|
try:
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
mach = self.__ldap.search('mid=' + mid, 'w')['machine'][0]
|
mach = cherrypy.session['LDAP'].search('mid=' + mid, 'w')['machine'][0]
|
||||||
# tester si c'est bien la machine de l'adherent
|
# tester si c'est bien la machine de l'adherent
|
||||||
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
||||||
del adh, mach
|
del adh, mach
|
||||||
|
@ -194,8 +199,8 @@ class root:
|
||||||
##########################
|
##########################
|
||||||
def AJAXSupprimerMachine(self, mid):
|
def AJAXSupprimerMachine(self, mid):
|
||||||
try:
|
try:
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
mach = self.__ldap.search('mid=' + mid, 'w')['machine'][0]
|
mach = cherrypy.session['LDAP'].search('mid=' + mid, 'w')['machine'][0]
|
||||||
# tester si c'est bien la machine de l'adherent
|
# tester si c'est bien la machine de l'adherent
|
||||||
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
||||||
del adh, mach
|
del adh, mach
|
||||||
|
@ -211,7 +216,7 @@ class root:
|
||||||
# machine:creation
|
# machine:creation
|
||||||
##########################
|
##########################
|
||||||
def AJAXCreerMachine(self, nomNouvelleMachine, MACNouvelleMachine, typeNouvelleMachine):
|
def AJAXCreerMachine(self, nomNouvelleMachine, MACNouvelleMachine, typeNouvelleMachine):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
if typeNouvelleMachine=='fixe' and adh.droits() == [] and adh.machines_fixes() != []:
|
if typeNouvelleMachine=='fixe' and adh.droits() == [] and adh.machines_fixes() != []:
|
||||||
return {'error':'Vous avez deja une machine fixe. Vous ne pouvez ajouter que des machines WiFi.'}
|
return {'error':'Vous avez deja une machine fixe. Vous ne pouvez ajouter que des machines WiFi.'}
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,10 +1,22 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: iso-8859-15 -*-
|
||||||
|
# ##################################################################################################### #
|
||||||
|
# MonCompte
|
||||||
|
# ##################################################################################################### #
|
||||||
|
# Description:
|
||||||
|
#
|
||||||
|
# Informations:
|
||||||
|
#
|
||||||
|
# Pages:
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ##################################################################################################### #
|
||||||
|
|
||||||
import cherrypy, sys, os, datetime
|
import cherrypy, sys, os, datetime
|
||||||
# libraries crans
|
# libraries crans
|
||||||
sys.path.append('/usr/scripts/gestion/')
|
sys.path.append('/usr/scripts/gestion/')
|
||||||
from config_mail import MailConfig
|
from config_mail import MailConfig
|
||||||
|
|
||||||
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
||||||
from ldap_crans_test import *
|
from ldap_crans_test import *
|
||||||
# print("monCompte : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
# print("monCompte : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
||||||
|
@ -15,12 +27,6 @@ else:
|
||||||
|
|
||||||
|
|
||||||
class monCompte:
|
class monCompte:
|
||||||
__ldap = None
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.__ldap = cherrypy.config.configMap["global"]["crans_ldap"]
|
|
||||||
|
|
||||||
|
|
||||||
def getCurrentAdministrativeYear(self):
|
def getCurrentAdministrativeYear(self):
|
||||||
'''
|
'''
|
||||||
premiere partie de l''annee scolaire en cours
|
premiere partie de l''annee scolaire en cours
|
||||||
|
@ -43,7 +49,7 @@ class monCompte:
|
||||||
# l'adherent + les formulaires
|
# l'adherent + les formulaires
|
||||||
#
|
#
|
||||||
def index(self, message = '', error = '', currentTab = 'mainTab'):
|
def index(self, message = '', error = '', currentTab = 'mainTab'):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
t = {}
|
t = {}
|
||||||
t['message'] = message
|
t['message'] = message
|
||||||
t['error'] = error
|
t['error'] = error
|
||||||
|
@ -120,7 +126,7 @@ class monCompte:
|
||||||
# via paypal
|
# via paypal
|
||||||
#
|
#
|
||||||
def rechargerCompteImpression(self, etape = '1', combien = None):
|
def rechargerCompteImpression(self, etape = '1', combien = None):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'])['adherent'][0]
|
||||||
if (etape == "1"): # Introduction
|
if (etape == "1"): # Introduction
|
||||||
return {
|
return {
|
||||||
'template' :'MonCompteRechargePaypal1',
|
'template' :'MonCompteRechargePaypal1',
|
||||||
|
@ -220,7 +226,7 @@ class monCompte:
|
||||||
# Adherent:nom
|
# Adherent:nom
|
||||||
##########################
|
##########################
|
||||||
def changeNomAdherent(self, nouveauNom):
|
def changeNomAdherent(self, nouveauNom):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
||||||
try:
|
try:
|
||||||
adh.nom(nouveauNom)
|
adh.nom(nouveauNom)
|
||||||
adh.save()
|
adh.save()
|
||||||
|
@ -245,7 +251,7 @@ class monCompte:
|
||||||
msg = 'Erreur, la confirmation ne correspond pas au nouveau mot de passe.'
|
msg = 'Erreur, la confirmation ne correspond pas au nouveau mot de passe.'
|
||||||
return self.index(error=msg)
|
return self.index(error=msg)
|
||||||
|
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
||||||
if adh.checkPassword(ancienPassword):
|
if adh.checkPassword(ancienPassword):
|
||||||
adh.changePasswd(nouveauPassword1)
|
adh.changePasswd(nouveauPassword1)
|
||||||
adh.save()
|
adh.save()
|
||||||
|
@ -263,7 +269,7 @@ class monCompte:
|
||||||
# Adherent:prenom
|
# Adherent:prenom
|
||||||
##########################
|
##########################
|
||||||
def changePrenomAdherent(self, nouveauPrenom):
|
def changePrenomAdherent(self, nouveauPrenom):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
||||||
try:
|
try:
|
||||||
adh.prenom(nouveauPrenom)
|
adh.prenom(nouveauPrenom)
|
||||||
adh.save()
|
adh.save()
|
||||||
|
@ -278,7 +284,7 @@ class monCompte:
|
||||||
# Adherent:tel
|
# Adherent:tel
|
||||||
##########################
|
##########################
|
||||||
def changeTelAdherent(self, nouveauTel):
|
def changeTelAdherent(self, nouveauTel):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'], 'w')['adherent'][0]
|
||||||
try:
|
try:
|
||||||
adh.tel(nouveauTel)
|
adh.tel(nouveauTel)
|
||||||
adh.save()
|
adh.save()
|
||||||
|
@ -293,7 +299,7 @@ class monCompte:
|
||||||
# mail:alias:creation
|
# mail:alias:creation
|
||||||
##########################
|
##########################
|
||||||
def newAlias(self, alias):
|
def newAlias(self, alias):
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
||||||
if adh.alias().__len__() >= 3:
|
if adh.alias().__len__() >= 3:
|
||||||
return self.index(error=u"Vous avez plus de 2 alias. Demander à un câbleur pour en rajouter.")
|
return self.index(error=u"Vous avez plus de 2 alias. Demander à un câbleur pour en rajouter.")
|
||||||
try:
|
try:
|
||||||
|
@ -328,7 +334,7 @@ class monCompte:
|
||||||
rewriteMailHeaders = True
|
rewriteMailHeaders = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
adh = self.__ldap.search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
adh = cherrypy.session['LDAP'].search('uid=' + cherrypy.session['uid'],'w')['adherent'][0]
|
||||||
if forwarding_address!=None:
|
if forwarding_address!=None:
|
||||||
MailConfig(cherrypy.session['uid'], forward=forwarding_address, spam=spanTreatment)
|
MailConfig(cherrypy.session['uid'], forward=forwarding_address, spam=spanTreatment)
|
||||||
adh.contourneGreylist(contourneGreylist)
|
adh.contourneGreylist(contourneGreylist)
|
||||||
|
|
|
@ -202,7 +202,7 @@ Crans.messages.setMessage('$error.replace("\'","\\\'")', 'errorMessage')
|
||||||
<ul class="tabbed_page">
|
<ul class="tabbed_page">
|
||||||
<li class="centrer last">
|
<li class="centrer last">
|
||||||
<input type="reset" value="Reset" />
|
<input type="reset" value="Reset" />
|
||||||
<input type="submit" name="mailSubmit" value="Soumettre" />
|
<input type="submit" value="Soumettre" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue