litellm/ui
Cursor Agent 714122ec90
fix(ui): stop useCan from fetching the org list for capabilities that don't use it
useCan called useIsOrgAdmin unconditionally, which fires
/organization/list via useOrganizations. That broke UsageTab and
CostOptimizationView tests (they render without a QueryClientProvider,
so the useQuery inside useIsOrgAdmin threw "No QueryClient set") and
also broke Workflows / Memory / Guardrails Monitor integration tests
that assert no fetch fires for a non-admin role.

Only viewDeletedTeams reads the org-admin flag (ORG_ADMIN_CAPABILITIES),
so drop the useIsOrgAdmin call from useCan and OR the org-admin
membership check in at the single caller in view_logs. The org-admin
membership fallback for viewDeletedTeams is preserved.

Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
2026-08-11 06:23:38 +00:00
..
litellm-dashboard fix(ui): stop useCan from fetching the org list for capabilities that don't use it 2026-08-11 06:23:38 +00:00
Dockerfile chore(build): move the Admin UI toolchain to Node 24 (#35801) 2026-08-04 12:36:07 -07:00
nginx.conf fix(ui): serve /ui/assets from the nginx image instead of SPA fallback (#34066) 2026-07-21 09:22:02 -07:00