diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-17 10:53:40 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-17 10:53:40 -0800 |
commit | 9cfa0009f9d291064e5faa0478b8ddf0143aea20 (patch) | |
tree | 6be75dfb1bea2fab41607fd76722038d4ca81df3 | |
parent | 24e7a7038f9f0c827a11282a5cc646117ffdfb9b (diff) | |
download | fatcat-9cfa0009f9d291064e5faa0478b8ddf0143aea20.tar.gz fatcat-9cfa0009f9d291064e5faa0478b8ddf0143aea20.zip |
flash login warning if no credentials
-rw-r--r-- | python/fatcat_web/routes.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index a5927d9b..926d5340 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -4,7 +4,7 @@ import json from flask import Flask, render_template, send_from_directory, request, \ url_for, abort, g, redirect, jsonify, session, flash from flask_login import login_required -from fatcat_web import app, api, auth_api +from fatcat_web import app, api, auth_api, priv_api from fatcat_web.auth import handle_token_login, handle_logout, load_user, handle_ia_xauth from fatcat_client.rest import ApiException from fatcat_web.search import do_search @@ -368,6 +368,8 @@ def search(): @app.route('/auth/login') def login(): # show the user a list of login options + if not priv_api: + flash("This web interface not configured with credentials to actually allow login (other than via token)") return render_template('auth_login.html') @app.route('/auth/ia/login', methods=['GET', 'POST']) |