Admin: gestión de usuarios (buscar, banear/desbanear)

- lib/admin-users.ts: searchAccounts (acore_auth.account + account_banned + gmlevel),
  banAccount/unbanAccount por BD (autoritativo) con kick best-effort por SOAP.
  Baneo días<=0 = permanente (unbandate=bandate, convención AzerothCore); desactiva
  baneo activo previo antes de insertar el nuevo.
- API: GET /api/admin/users?q=, POST {accountId, action:ban|unban, reason, days} (403 sin admin).
- UI: /admin/users con AdminUsersManager (buscar por usuario/email, badges GM/online/baneado,
  banear con motivo+días o desbanear), enlace desde el índice del admin.
- i18n es/en (Admin): 14 claves nuevas.

Verificado: build OK, /admin/users 307→login, APIs 403 sin admin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 00:39:08 +00:00
parent d9e6ff1496
commit d382adcd59
7 changed files with 297 additions and 2 deletions
+14 -1
View File
@@ -332,7 +332,20 @@
"goldAmount": "Gold amount",
"goldPrice": "Price (€)",
"goldUnit": "gold",
"noGold": "No gold options."
"noGold": "No gold options.",
"manageUsers": "Manage users",
"users": "Users",
"searching": "Searching…",
"userSearchPlaceholder": "Search account by username or email…",
"noUsers": "No matching accounts.",
"online": "Online",
"banned": "Banned",
"lastLogin": "Last login",
"ban": "Ban",
"unban": "Unban",
"banReasonPrompt": "Ban reason:",
"banDaysPrompt": "Ban days (0 = permanent):",
"confirmUnban": "Unban {name}?"
},
"Vote": {
"title": "Vote for us",