From 9cfa0009f9d291064e5faa0478b8ddf0143aea20 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 17 Jan 2019 10:53:40 -0800 Subject: flash login warning if no credentials --- python/fatcat_web/routes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') 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']) -- cgit v1.2.3