Root url should redirect if user is already logged in
This commit is contained in:
@@ -25,6 +25,9 @@ def root():
|
||||
"?{}".format(url.urlencode({"next": request.args.get("next")})),
|
||||
)
|
||||
|
||||
if g.current_user:
|
||||
return redirect(url_for(".home"))
|
||||
|
||||
return render_template(
|
||||
"login.html", redirect=bool(request.args.get("next")), redirect_url=redirect_url
|
||||
)
|
||||
|
Reference in New Issue
Block a user