mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
[Fix] RBAC: Add /invitation/info to admin_viewer_routes
Greptile review caught that the /invitation/info handler relaxation was dead code: the route_checks layer rejects admin viewers before the handler runs because /invitation/info was never added to admin_viewer_routes. Add /invitation/info to admin_viewer_routes and extend the route-level parametrized test to cover it. The handler-level integration test passed previously because `app.dependency_overrides[user_api_key_auth]` bypasses route_checks; this new route-level test exercises the layer that production traffic hits.
This commit is contained in:
parent
cfda5e17ac
commit
f81fbdabe6
2 changed files with 4 additions and 0 deletions
|
|
@ -756,6 +756,8 @@ class LiteLLMRoutes(enum.Enum):
|
|||
"/config/field/info",
|
||||
"/budget/list",
|
||||
"/budget/settings",
|
||||
# Invitation viewing (admin viewer cannot create/delete; can read).
|
||||
"/invitation/info",
|
||||
# Model cost map maintenance views (read-only status / source).
|
||||
"/schedule/model_cost_map_reload/status",
|
||||
"/model/cost_map/source",
|
||||
|
|
|
|||
|
|
@ -1323,6 +1323,8 @@ ADMIN_VIEWER_SETTINGS_ROUTES = [
|
|||
# Budgets page
|
||||
"/budget/list",
|
||||
"/budget/settings",
|
||||
# Invitation viewing (admin viewer cannot create/delete; can read)
|
||||
"/invitation/info",
|
||||
# Model cost map (read-only status / source)
|
||||
"/schedule/model_cost_map_reload/status",
|
||||
"/model/cost_map/source",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue