diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-10-08 11:05:01 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-10-08 11:08:39 +0200 |
commit | 9fd74021afb0a6d4551b21615f7094b1b0705f63 (patch) | |
tree | 5b7936ee1400875a1d31731a576d16d213cb5ad3 /service | |
parent | 3edd9fcb2cd0ea1f05f0277c85430c9751878406 (diff) |
Added logout link to dispatcher (issue #55).
- Set DISPATCHER_LOGOUT_URL environment to logout url to show logout.
- Logout button currently lacks some design
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/user_agent.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index bee0035b..c61618b9 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -54,9 +54,13 @@ def respond_json(entity, status_code=200): return response -@app.route('/disabled_features') -def disabled_features(): - return respond_json(DISABLED_FEATURES) +@app.route('/features') +def features(): + try: + disabled_features = {'logout': os.environ['DISPATCHER_LOGOUT_URL']} + except KeyError: + disabled_features = {} + return respond_json({'disabled_features': DISABLED_FEATURES, 'dispatcher_features': disabled_features}) @app.route('/mails', methods=['POST']) |