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