Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit b684bfb6 authored by Marc Duez's avatar Marc Duez

server : use anon function everywhere !!!

parent 6c6bc356
......@@ -10,6 +10,7 @@
#########################################################################
import defs
import vidjil_utils
import gluon.contrib.simplejson, time, datetime
if request.env.http_origin:
......@@ -164,9 +165,6 @@ def get_analysis():
if error == "" :
res["info_patient"] = db.patient[request.vars["patient"]].info
res["patient"] = db.patient[request.vars["patient"]].first_name + " " + db.patient[request.vars["patient"]].last_name + " (" + db.config[request.vars["config"]].name + ")"
## récupération des infos se trouvant dans le fichier .analysis
analysis_query = db( (db.analysis_file.patient_id == request.vars["patient"])
& (db.analysis_file.config_id == request.vars["config"] ) )
......@@ -185,7 +183,7 @@ def get_analysis():
res["samples"]= analysis["samples"]
res["info_patient"] = db.patient[request.vars["patient"]].info
res["patient"] = db.patient[request.vars["patient"]].first_name + " " + db.patient[request.vars["patient"]].last_name + " (" + db.config[request.vars["config"]].name + ")"
res["patient"] = vidjil_utils.anon(db.patient[request.vars["patient"]].id, auth.user_id) + " (" + db.config[request.vars["config"]].name + ")"
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
else :
......
# coding: utf8
import gluon.contrib.simplejson, datetime
import vidjil_utils
if request.env.http_origin:
response.headers['Access-Control-Allow-Origin'] = request.env.http_origin
response.headers['Access-Control-Allow-Credentials'] = 'true'
......@@ -16,7 +17,7 @@ def info():
if request.vars["config_id"] and request.vars["config_id"] != "-1" :
config_id = long(request.vars["config_id"])
patient_name = patient.first_name + " " + patient.last_name
patient_name = vidjil_utils.anon(patient.id, auth.user_id)
config_name = db.config[request.vars["config_id"]].name
fused = db(
......
......@@ -124,7 +124,7 @@
<div class="db_block_right">
see the result:
{{for row in db(db.fused_file.patient_id == request.vars["id"]).select() :}}
{{filename = db.patient[request.vars["id"]].first_name + " " + db.patient[request.vars["id"]].last_name + " (" + db.config[row.config_id].name + ")"}}
{{filename = vidjil_utils.anon(request.vars["id"], auth.user_id) + " (" + db.config[row.config_id].name + ")"}}
{{if row.fused_file is not None :}}
<span class="button2" onclick="if( event.which == 2 ) { window.open('index.html?patient={{=request.vars["id"]}}&config={{=row.config_id}}') }
else{db.load_data( { 'patient' : '{{=request.vars["id"]}}' , 'config' : {{=row.config_id}} }, '{{=filename}}' ) }" >
......
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