diff options
author | Frederick Muriuki Muriithi | 2024-07-25 16:54:48 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-07-26 16:45:32 -0500 |
commit | 729703972f67cd8a61460d275313ad7c55b019b3 (patch) | |
tree | 17c93a98ad30d762876cd3c25a4b58f690924e36 /uploader/entry.py | |
parent | 365f360f0e79c761bd6fb9c26009b4f782f752eb (diff) | |
download | gn-uploader-729703972f67cd8a61460d275313ad7c55b019b3.tar.gz |
Provide UI for enabling login to the application.
Diffstat (limited to 'uploader/entry.py')
-rw-r--r-- | uploader/entry.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/uploader/entry.py b/uploader/entry.py index 4a02f1e..941200a 100644 --- a/uploader/entry.py +++ b/uploader/entry.py @@ -17,6 +17,7 @@ from flask import ( from uploader.db import species from uploader.db_utils import with_db_connection +from uploader.oauth2.client import user_logged_in entrybp = Blueprint("entry", __name__) @@ -87,7 +88,7 @@ def zip_file_errors(filepath, upload_dir) -> Tuple[str, ...]: @entrybp.route("/", methods=["GET"]) def index(): """Load the landing page""" - return render_template("index.html") + return render_template("index.html" if user_logged_in() else "login.html") @entrybp.route("/upload", methods=["GET", "POST"]) def upload_file(): |