login msg enhanced
This commit is contained in:
parent
b9b76445fc
commit
96add750f6
1 changed files with 3 additions and 3 deletions
|
|
@ -356,14 +356,14 @@ class GatewayInterface:
|
||||||
user = next((u for u in users if u.get("username") == username), None)
|
user = next((u for u in users if u.get("username") == username), None)
|
||||||
|
|
||||||
if not user:
|
if not user:
|
||||||
return None
|
raise ValueError("Benutzer nicht gefunden")
|
||||||
|
|
||||||
if not self._verifyPassword(password, user.get("hashedPassword", "")):
|
if not self._verifyPassword(password, user.get("hashedPassword", "")):
|
||||||
return None
|
raise ValueError("Falsches Passwort")
|
||||||
|
|
||||||
# Check if the user is disabled
|
# Check if the user is disabled
|
||||||
if user.get("disabled", False):
|
if user.get("disabled", False):
|
||||||
return None
|
raise ValueError("Benutzer ist deaktiviert")
|
||||||
|
|
||||||
# Create a copy without password hash
|
# Create a copy without password hash
|
||||||
authenticatedUser = {**user}
|
authenticatedUser = {**user}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue