fix(auth): flexibilizar login por email/usuario, asegurar hash admin123 y corregir cookies sobre HTTP

This commit is contained in:
2026-09-23 14:59:46 -03:00
parent bddd382c96
commit b540015b7e
7 changed files with 47 additions and 20 deletions
+1 -3
View File
@@ -364,9 +364,7 @@ def init_database():
u_obj.role_id = r_match.id
u_obj.role = u_info['role_code']
u_obj.is_active = True
if not u_obj.check_password("admin123"):
u_obj.set_password("admin123")
print(f" [*] Clave de {u_info['email']} restablecida a 'admin123'.")
u_obj.set_password("admin123")
if not u_obj.preferred_language:
u_obj.preferred_language = "es"
if not u_obj.theme_preference: