Mercurial > templog
diff web/templog.py @ 189:101c66da848d
watcher script
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 09 Feb 2014 11:41:13 +0800 |
parents | ae5efca89001 |
children | 8318d50d766d |
line wrap: on
line diff
--- a/web/templog.py Fri Feb 07 23:32:08 2014 +0800 +++ b/web/templog.py Sun Feb 09 11:41:13 2014 +0800 @@ -58,9 +58,11 @@ @route('/set') def set(): + allowed = ["false", "true"][secure.get_user_hash() in config.ALLOWED_USERS] return bottle.template('set', inline_data = log.get_params(), - csrf_blob = secure.get_csrf_blob()) + csrf_blob = secure.get_csrf_blob(), + allowed = allowed) @route('/set_current.json') def set_fresh(): @@ -113,8 +115,8 @@ @route('/env') def env(): response.set_header('Content-Type', 'text/plain') - return '\n'.join(traceback.format_stack()) - #return '\n'.join(("%s %s" % k) for k in request.environ.items()) + #return '\n'.join(traceback.format_stack()) + return '\n'.join(("%s %s" % k) for k in request.environ.items()) #return str(request.environ) #yield "\n" #var_lookup = environ['mod_ssl.var_lookup']