mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
An internal user who administers an organization saw an empty Organization Usage dashboard and had to be promoted to proxy admin to see any of it. Two independent gates were closed on them. The route layer rejected GET /organization/daily/activity with 401 before the handler ran, since the route belonged to no list a non-proxy-admin can reach, and the handler's own org-admin scoping was therefore dead code. In the dashboard, viewOrganizationUsage was granted by session role alone, and an org admin's session role is internal_user, so the Organization Usage option never rendered and its data fetch stayed disabled. The route now sits in self_managed_routes, where the handler restricts results to organizations the caller is ORG_ADMIN of and 403s on any other org, and viewOrganizationUsage joins the existing per-capability org-admin allowance that already covers viewDeletedTeams. A caller who administers no organization resolves to an empty id list rather than to None, so the organization-alias lookup is scoped by that same list instead of reading the whole table. The Usage page falls back to the global view when org-admin membership is revoked while it is open, so the selector never keeps a value it no longer offers. |
||
|---|---|---|
| .. | ||
| test_admin_viewer_handler_access.py | ||
| test_auth_checks.py | ||
| test_auth_exception_handler.py | ||
| test_auth_hot_path_network_requests.py | ||
| test_auth_utils.py | ||
| test_banned_params_extra_body.py | ||
| test_cli_auth.py | ||
| test_custom_auth_end_user_budget.py | ||
| test_handle_jwt.py | ||
| test_info_routes.py | ||
| test_litellm_license.py | ||
| test_login_utils.py | ||
| test_mcp_ip_filtering.py | ||
| test_model_checks.py | ||
| test_model_checks_fallbacks.py | ||
| test_multi_budget_windows.py | ||
| test_network.py | ||
| test_oauth2_proxy_hook.py | ||
| test_object_permission_loading.py | ||
| test_onboarding.py | ||
| test_organization_budget_enforcement.py | ||
| test_password_hashing.py | ||
| test_resolvers_exceptions.py | ||
| test_resolvers_models.py | ||
| test_resolvers_seam.py | ||
| test_resolvers_store.py | ||
| test_route_checks.py | ||
| test_router_override_fallback_auth.py | ||
| test_team_member_budget.py | ||
| test_unmapped_model_budget_enforcement.py | ||
| test_user_api_key_auth.py | ||