Fix admin permissions bounce, prefixes APIs, and Italian UI leftovers.
Local Build and Deploy / deploy (push) Successful in 56s

Gate permissions on ACL manage + resolve super-admin from live user ranks, restore prefixes API routes, and anglicize hardcoded admin copy with nav i18n.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-15 20:33:00 +02:00
1 parent 0e89d03940
commit 3403d3b19f
38 files changed
+673 -208

No files matched your search

+11 -1
View File
@@ -104,10 +104,20 @@ const getCurrentAuthorizationState = cache(async (userId: number) =>
resolveAuthorizationState(userId, {
user: prisma.user,
highestRank: async () => {
// Prefer the highest rank actually held by a user. Unused high IDs in
// permission_ranks (common on Habbo DBs) would otherwise lock the real
// owner out of super-admin / permissions management.
const rows = await prisma.$queryRaw<
{ highest_rank: number | bigint | null }[]
>`
SELECT MAX(id) AS highest_rank FROM permission_ranks
SELECT COALESCE(
(
SELECT MAX(u.\`rank\`)
FROM users u
INNER JOIN permission_ranks pr ON pr.id = u.\`rank\`
),
(SELECT MAX(id) FROM permission_ranks)
) AS highest_rank
`;
return rows[0]?.highest_rank == null
? null