2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Provide client hook to get session info

Web client may come in without knowing the session info.
Provide it additional data to populate UI elements.
This commit is contained in:
Jarrod Johnson 2016-02-28 18:48:18 -05:00
parent 64751bccee
commit 5ab6a9e7b7

View File

@ -468,6 +468,10 @@ def resourcehandler_backend(env, start_response):
url = env['PATH_INFO']
url = url.replace('.json', '')
url = url.replace('.html', '')
if url == '/sessions/current/info':
start_response('200 OK', headers)
yield json.dumps({'username': authorized['username']})
return
resource = '.' + url[url.rindex('/'):]
lquerydict = copy.deepcopy(querydict)
try: