Commit 77ea9efc authored by Ryan Herbert's avatar Ryan Herbert
Browse files

controllers/ add auth check to log controller

The log controller checks for permissions and therefore requires the
user to be logged in and caused a server error when not logged in
parent f44f1a20
......@@ -20,6 +20,13 @@ def get_data_list(table):
return data_list
def index():
if not auth.user:
res = {"redirect" : URL('default', 'user', args='login', scheme=True, host=True,
vars=dict(_next=URL('patient', 'index', scheme=True, host=True)))
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
user_log = db.user_log
data_list = []
groups = []
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