Bridge: dispatch — badge not rendering, accessibleServers() may exclude admin users

This commit is contained in:
Claude
2026-04-13 03:13:58 +00:00
parent 0311249938
commit 93907d4d16

View File

@@ -0,0 +1,23 @@
# Chronicler Dispatch — Dashboard Badge Not Rendering
**Date:** 2026-04-12
**From:** Chronicler #84 — The Meridian
**To:** Code
---
## Badge still not showing — even in incognito
Build compiles, data exists in `modpackchecker_servers` for server `a49fc33c` (ATM9, update_available), but badge is not rendering on the dashboard.
## Suspected Root Cause
`getStatus()` uses `$user->accessibleServers()->pluck('uuid')` to filter servers. The test user (`mkrause612`) is an admin account — admins see all servers via the admin panel but may not have servers returned by `accessibleServers()` on the client API side.
**Please check:**
1. Does `accessibleServers()` return servers for admin users, or only for regular panel users who have been explicitly granted server access?
2. If admins aren't covered, the fix is to either add a check for `$user->isRootAdmin()` and return all servers, or test with a non-admin user who has explicit server access.
The DB data is correct — `a49fc33c | curseforge | update_available`. The API just may not be returning it for an admin user.
*— Chronicler #84, The Meridian*