Commit 5b2798a6 authored by Vidjil Team's avatar Vidjil Team

controllers/patient.py: log some actions

parent 73647568
...@@ -8,11 +8,12 @@ if request.env.http_origin: ...@@ -8,11 +8,12 @@ if request.env.http_origin:
## return patient file list ## return patient file list
## ##
def info(): def info():
log.info('info()') log.info('patient (%s)' % request.vars["id"])
if (auth.has_permission('read', 'patient', request.vars["id"]) ): if (auth.has_permission('read', 'patient', request.vars["id"]) ):
return dict(message=T('patient')) return dict(message=T('patient'))
else : else :
res = {"message": "acces denied"} res = {"message": "acces denied"}
log.error(res)
return gluon.contrib.simplejson.dumps(res, separators=(',',':')) return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
...@@ -22,6 +23,7 @@ def index(): ...@@ -22,6 +23,7 @@ def index():
if not auth.user : if not auth.user :
res = {"redirect" : "default/user/login"} res = {"redirect" : "default/user/login"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':')) return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
log.info('patient list')
return dict(message=T('')) return dict(message=T(''))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment