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
@@ -10,7 +10,7 @@ export async function getGmlevel(accountId: number | undefined): Promise<number>
if (!accountId) return 0
try {
const [rows] = await db(DB.auth).query<RowDataPacket[]>(
'SELECT MAX(gmlevel) AS lvl FROM account_access WHERE id = ?',
'SELECT MAX(SecurityLevel) AS lvl FROM account_access WHERE AccountID = ?',
[accountId],
)
return rows[0] && rows[0].lvl != null ? Number(rows[0].lvl) : 0