setup for multiple settings sections

This commit is contained in:
Jakob Ketterl
2020-04-25 21:42:00 +02:00
parent 2f011ea249
commit b874583931
6 changed files with 41 additions and 9 deletions

View File

@ -46,12 +46,12 @@ class SessionController(WebpageController):
if data["user"] in userlist:
user = userlist[data["user"]]
if user.password.is_valid(data["password"]):
# TODO pass the final destination
# TODO evaluate password force_change and redirect to password change
key = SessionStorage.getSharedInstance().startSession({"user": user.name})
cookie = SimpleCookie()
cookie["owrx-session"] = key
self.send_redirect("/admin", cookies=cookie)
# TODO pass the final destination
self.send_redirect("/settings", cookies=cookie)
return
self.send_redirect("/login")