diff --git a/advlabdb/routes.py b/advlabdb/routes.py index c91679e..0762a64 100644 --- a/advlabdb/routes.py +++ b/advlabdb/routes.py @@ -16,9 +16,19 @@ def util_processor(): @app.route("/") def index(): if current_user.has_role("admin"): - return redirect(url_for("index") + "admin") + url = url_for("index") + "admin" + + if current_user.login_count == 1: + url += "/docs" + + return redirect(url) elif current_user.has_role("assistant"): - return redirect(url_for("index") + "assistant") + url = url_for("index") + "assistant" + + if current_user.login_count == 1: + url += "/docs" + + return redirect(url) else: return redirect(url_for("security.login"))