Tweak the login page

This commit is contained in:
Thomas Sileo
2018-07-15 21:25:09 +02:00
parent e3284416d2
commit 5323995633
3 changed files with 17 additions and 4 deletions

3
app.py
View File

@@ -471,6 +471,9 @@ def admin_logout():
@app.route("/login", methods=["POST", "GET"])
def admin_login():
if session.get("logged_in") is True:
return redirect(url_for("admin_notifications"))
devices = [doc["device"] for doc in DB.u2f.find()]
u2f_enabled = True if devices else False
if request.method == "POST":