From 981b249a2e57ed56062a8a703cd1b1247e4b1bf5 Mon Sep 17 00:00:00 2001 From: gdetrez Date: Mon, 30 Oct 2006 23:54:47 +0100 Subject: [PATCH] log des connexions. Je n'arrive pas me loguer avec links sur zamok... darcs-hash:20061030225447-f46e9-c1291666d2c9e063390f0be1ac6dc53898e89e1a.gz --- intranet/Root.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/intranet/Root.py b/intranet/Root.py index 8e3a7a64..556cfe00 100755 --- a/intranet/Root.py +++ b/intranet/Root.py @@ -104,18 +104,18 @@ class Intranet: def _cp_on_http_error(self, status, message): - if status==403: - cherrypy.response.body = { - 'template':'error403', - 'values':{'status':status, 'message':message }, - 'standalone':False, - } - elif status==404: - cherrypy.response.body = { - 'template':'error', - 'values':{'status':status, 'message':message }, - 'standalone':False, - } + if status==403: + cherrypy.response.body = { + 'template':'error403', + 'values':{'status':status, 'message':message }, + 'standalone':False, + } + elif status==404: + cherrypy.response.body = { + 'template':'error', + 'values':{'status':status, 'message':message }, + 'standalone':False, + } else: cherrypy._cputil._cp_on_http_error(status, message) @@ -159,6 +159,7 @@ def verifLogin(login = '', password = ''): cherrypy.session['uid'] = login cherrypy.session['session_key'] = True cherrypy.session['droits'] = adh.droits() + cherrypy.log("User logged in : %s" % cherrypy.session['uid'], "LOGIN") return else: #print("bad password") @@ -169,7 +170,7 @@ def verifLogin(login = '', password = ''): else: #print("sth empty") message = u"L'authentification a echoué." - return message + return message