fix: allowlist acepta correos sin hash (valida backend)

This commit is contained in:
Nurfog committed 2026-09-09 15:37:55 -03:00
1 parent 1ec2edc99b
commit c6a629cf7b
1 file changed
+6 -1
+6 -1
View File
@@ -34,7 +34,12 @@ export function parseUsers(): Map<string, string> {
const raw = process.env.IT_USERS || "";
for (const part of raw.split(",")) {
const i = part.indexOf(":");
if (i > 0) m.set(part.slice(0, i).trim().toLowerCase(), part.slice(i + 1).trim());
if (i > 0) {
m.set(part.slice(0, i).trim().toLowerCase(), part.slice(i + 1).trim());
} else if (part.trim()) {
// Sin hash: la clave la valida el backend (sige_sam_v3.usuario)
m.set(part.trim().toLowerCase(), "");
}
}
return m;
}