Commit 748e0572 authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

Replacing more accessible_query with vidjil_accessible_query

parent c08703d6
...@@ -208,7 +208,7 @@ def edit(): ...@@ -208,7 +208,7 @@ def edit():
)) ))
query_patient = db( query_patient = db(
auth.accessible_query('admin', db.patient) auth.vidjil_accessible_query('admin', db.patient)
).select( ).select(
db.patient.ALL, db.patient.ALL,
orderby = ~db.patient.id orderby = ~db.patient.id
...@@ -225,7 +225,7 @@ def edit(): ...@@ -225,7 +225,7 @@ def edit():
patient = birth+name+id patient = birth+name+id
query_run = db( query_run = db(
auth.accessible_query('admin', db.run) auth.vidjil_accessible_query('admin', db.run)
).select( ).select(
db.run.ALL, db.run.ALL,
orderby = ~db.run.id orderby = ~db.run.id
......
...@@ -190,7 +190,7 @@ def index(): ...@@ -190,7 +190,7 @@ def index():
query3 = db( query3 = db(
(db.patient.sample_set_id == db.fused_file.sample_set_id) & (db.patient.sample_set_id == db.fused_file.sample_set_id) &
(db.fused_file.config_id == db.config.id) & (db.fused_file.config_id == db.config.id) &
(auth.accessible_query('read', db.config) | auth.accessible_query('admin', db.config) ) (auth.vidjil_accessible_query('read', db.config) | auth.vidjil_accessible_query('admin', db.config) )
).select( ).select(
db.patient.id, db.config.name, db.config.id, db.fused_file.fused_file db.patient.id, db.config.name, db.config.id, db.fused_file.fused_file
) )
......
...@@ -26,7 +26,7 @@ def index(): ...@@ -26,7 +26,7 @@ def index():
##retrieve run list ##retrieve run list
query_run = db( query_run = db(
auth.accessible_query('read', db.run) auth.vidjil_accessible_query('read', db.run)
).select( ).select(
db.run.ALL, db.run.ALL,
orderby = ~db.run.id orderby = ~db.run.id
......
...@@ -28,10 +28,10 @@ def next_sample_set(): ...@@ -28,10 +28,10 @@ def next_sample_set():
go_next = int(request.vars['next']) go_next = int(request.vars['next'])
if go_next > 0: if go_next > 0:
res = db((db[sample_type].id > current_id) & (auth.accessible_query('read', db[sample_type]))).select( res = db((db[sample_type].id > current_id) & (auth.vidjil_accessible_query('read', db[sample_type]))).select(
db[sample_type].id, db[sample_type].sample_set_id, orderby=db[sample_type].id, limitby=(0,1)) db[sample_type].id, db[sample_type].sample_set_id, orderby=db[sample_type].id, limitby=(0,1))
else: else:
res = db((db[sample_type].id < current_id) & (auth.accessible_query('read', db[sample_type]))).select( res = db((db[sample_type].id < current_id) & (auth.vidjil_accessible_query('read', db[sample_type]))).select(
db[sample_type].id, db[sample_type].sample_set_id, orderby=~db[sample_type].id, limitby=(0,1)) db[sample_type].id, db[sample_type].sample_set_id, orderby=~db[sample_type].id, limitby=(0,1))
if (len(res) > 0): if (len(res) > 0):
request.vars["id"] = str(res[0].sample_set_id) request.vars["id"] = str(res[0].sample_set_id)
......
Supports Markdown
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