Commit 451bb656 authored by Marc Duez's avatar Marc Duez

server : clean controllers

parent 7245e90e
......@@ -360,7 +360,7 @@ def edit_form():
def download():
return response.download(request, db)
return response.download(request, db)
#
......@@ -391,7 +391,7 @@ def delete():
res = {"redirect": "patient/index",
"success": "true",
"message": "patient ("+request.vars["id"]+") deleted"}
"message": "patient ("+str(request.vars["id"])+") deleted"}
log.info(res)
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
else :
......
......@@ -82,7 +82,7 @@ def info():
def confirm():
if (auth.has_permission('admin', 'patient', db.sequence_file[db.results_file[request.vars["results_file_id"]].sequence_file_id].patient_id )
& auth.has_permission("run", "results_file") ):
& auth.has_permission("run", "results_file") ) or auth.has_membership("admin"):
return dict(message=T('result confirm'))
else :
res = {"message": "acces denied"}
......@@ -91,7 +91,7 @@ def confirm():
#
def delete():
if (auth.has_permission('admin', 'patient', db.sequence_file[db.results_file[request.vars["results_file_id"]].sequence_file_id].patient_id )
& auth.has_permission("run", "results_file") ):
& auth.has_permission("run", "results_file") ) or auth.has_membership("admin"):
config_id = db.results_file[request.vars["results_file_id"]].config_id
patient_id = db.sequence_file[db.results_file[request.vars["results_file_id"]].sequence_file_id].patient_id
......
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