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
|
@ -1,26 +1,23 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
# ##################################################################################################### #
|
||||
# Factures #
|
||||
# Factures
|
||||
# ##################################################################################################### #
|
||||
# Description: #
|
||||
# Affiche la liste des factures et l'historique de débits/crédits de l'adhérent. #
|
||||
# Informations: #
|
||||
# #
|
||||
# Pages: #
|
||||
# index:liste des factures #
|
||||
# historique: historique des débits/crédits #
|
||||
# Description:
|
||||
# Affiche la liste des factures et l'historique de débits/crédits de l'adhérent.
|
||||
# Informations:
|
||||
#
|
||||
# Pages:
|
||||
# index:liste des factures
|
||||
# historique: historique des débits/crédits
|
||||
#
|
||||
# ##################################################################################################### #
|
||||
import cherrypy, sys, os, datetime
|
||||
|
||||
class root:
|
||||
__ldap = None
|
||||
|
||||
def __init__(self):
|
||||
self.__ldap = cherrypy.config.configMap["global"]["crans_ldap"]
|
||||
|
||||
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['message'] = message
|
||||
t['error'] = error
|
||||
|
@ -58,7 +55,7 @@ class root:
|
|||
index.exposed = True
|
||||
|
||||
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') ]
|
||||
histLst = []
|
||||
|
@ -84,7 +81,7 @@ class root:
|
|||
def delFacture(self, no):
|
||||
try:
|
||||
# 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
|
||||
if not fact.proprietaire().mail() == cherrypy.session['uid']:
|
||||
raise Exception, "Impossible de supprimer cette facture"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue