feat(auth): promover admin@telcotronics.com a superadmin, depurar usuarios dummy y unificar login WebControl/usuario

This commit is contained in:
2026-11-01 10:02:51 -05:00
parent 82b1a52524
commit ea66662570
3 changed files with 61 additions and 13 deletions
+2 -5
View File
@@ -369,12 +369,9 @@ async function setup() {
const bcrypt = require('bcryptjs');
const hash = await bcrypt.hash('123456', 10);
const users = [
[1, 'super@helpdesk.com', 'Super Admin', 'superadmin'],
[1, 'admin@telcotronics.local', 'Admin Telcotronics', 'admin'],
[1, 'admin@telcotronics.com', 'PABLO FARIAS', 'superadmin'],
[2, 'admin@xsystem.com', 'Admin XSYSTEM', 'admin'],
[3, 'admin@domus.com', 'Admin DOMUS', 'admin'],
[1, 'agent@helpdesk.com', 'Agente', 'agent'],
[1, 'client@helpdesk.com', 'Cliente', 'client']
[3, 'admin@domus.com', 'Admin DOMUS', 'admin']
];
for (const [cId, email, nombre, rol] of users) {
const [u] = await conn.query('SELECT id, rol FROM users WHERE email = ?', [email]);