implement user list, enable, disable

This commit is contained in:
Jakob Ketterl
2021-02-08 17:04:55 +01:00
parent b0c7abe362
commit 2c6b0e3d30
4 changed files with 48 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class SessionController(WebpageController):
if "user" in data and "password" in data:
if data["user"] in userlist:
user = userlist[data["user"]]
if user.password.is_valid(data["password"]):
if user.is_enabled() and user.password.is_valid(data["password"]):
# TODO evaluate password force_change and redirect to password change
key = SessionStorage.getSharedInstance().startSession({"user": user.name})
cookie = SimpleCookie()