feat: password change + split account/household settings UI
- New /change-password route: validates current password, enforces min 4 chars, requires confirmation match - update_password() helper in models.py - Dashboard UI split into two collapsible sections: 👤 Account Settings (password, ntfy, delete account) 🏠 Household Settings (admin only: public link, timezone, delete household) - 14 new i18n keys with fr/de translations - Restored accidentally dropped 'Delete My Account' key
This commit is contained in:
@@ -195,6 +195,13 @@ def set_public_enabled(household_id: int, enabled: bool) -> None:
|
||||
|
||||
# ── Users ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
def update_password(user_id: int, new_password_hash: str) -> None:
|
||||
"""Update a user's password hash."""
|
||||
with get_db() as db:
|
||||
db.execute("UPDATE users SET password_hash = ? WHERE id = ?",
|
||||
(new_password_hash, user_id))
|
||||
|
||||
|
||||
def get_user_by_id(user_id: int) -> dict | None:
|
||||
"""Fetch a single user by ID."""
|
||||
with get_db() as db:
|
||||
|
||||
Reference in New Issue
Block a user