Commit 75e96632 authored by Marc Duez's avatar Marc Duez

server : check user for admin panel

parent 0c3fab65
...@@ -8,21 +8,24 @@ if request.env.http_origin: ...@@ -8,21 +8,24 @@ if request.env.http_origin:
## return admin_panel ## return admin_panel
def index(): def index():
return dict(message=T('')) if auth.has_membership("admin"):
return dict(message=T(''))
def result(): def result():
return dict(message=T('')) if auth.has_membership("admin"):
return dict(message=T(''))
def run_all(): def run_all():
query = db( if auth.has_membership("admin"):
(db.data_file.sequence_file_id==db.sequence_file.id) query = db(
& (db.data_file.config_id==db.config.id) (db.data_file.sequence_file_id==db.sequence_file.id)
).select() & (db.data_file.config_id==db.config.id)
).select()
for row in query:
schedule_run(row.sequence_file.id, row.config.id) for row in query:
schedule_run(row.sequence_file.id, row.config.id)
res = {"success" : "true",
"message" : "rerun all"} res = {"success" : "true",
return gluon.contrib.simplejson.dumps(res, separators=(',',':')) "message" : "rerun all"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
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