mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Redirect first login to docs
This commit is contained in:
parent
3ad255b1dc
commit
a163cb3be7
1 changed files with 12 additions and 2 deletions
|
@ -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"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue