Admin: corregir columnas de account_access + enlace al panel en la cuenta

- Este build de AzerothCore usa account_access(AccountID, SecurityLevel), no el
  clásico (id, gmlevel). Se corrigen las 4 consultas (admin.ts, forum-perm.ts,
  forum.ts, admin-users.ts) -> isAdmin/forumIsModerator/gmlevel ahora funcionan.
- account page: enlace destacado al Panel de administración, visible solo si isAdmin.
- i18n es/en: Account.adminPanel.

Verificado: build OK; cuenta de prueba con SecurityLevel 3 (>= ADMIN_GMLEVEL) es admin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 01:42:04 +00:00
parent 95df2e029d
commit 1a45d48412
7 changed files with 20 additions and 6 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ export async function searchAccounts(query: string, limit = 30): Promise<Account
const like = `%${query}%`
const [rows] = await db(DB.auth).query<RowDataPacket[]>(
`SELECT a.id, a.username, a.email, a.last_ip, a.last_login, a.online,
(SELECT MAX(x.gmlevel) FROM account_access x WHERE x.id = a.id) AS gmlevel,
(SELECT MAX(x.SecurityLevel) FROM account_access x WHERE x.AccountID = a.id) AS gmlevel,
b.banreason AS ban_reason, b.bandate, b.unbandate
FROM account a
LEFT JOIN account_banned b ON b.id = a.id AND b.active = 1