litellm/tests/integration/authorization
ryan-crabbe-berri 98c04159aa refactor(proxy): answer team admin checks with the set of roles a caller holds
roles_on(team, caller, orgs) in management/teams/authz.py replaces
TeamAccess.allows, strongest_role, TEAM_OR_ORG_ADMIN and TEAM_ADMIN_ONLY.
It returns the union of the admin roles the caller holds on the team, so a
route denies on an empty set and /team/update restricts only a caller whose
sole role is team admin. The org-admin lookup moves onto
OrganizationMembershipRepository.is_org_admin, which reads the membership row
directly, and management/users/service.py goes away.

The single-team gates that only read the roster now ask roles_on too, so an
org admin can delete and reset spend on keys in their org's teams, add,
update and delete team models, check auto-router availability and create
projects when the projects permission is on. The matrix flips exactly those
seven org_admin cells from 403 to 200.
2026-09-30 15:27:38 -07:00
..
_guardrail_opt_out.py fix(proxy): gate disable_global_guardrails on keys and teams to proxy admins (#42699) 2026-09-23 18:03:02 -07:00
test_access_group_model_listing.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_bedrock_passthrough_model_access.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_jwt_default_team_provisioning.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_jwt_mapped_key_email_backfill.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_key_alias_model_access.py fix(proxy): authorize key model aliases the same way as team aliases (#43049) 2026-09-24 19:51:02 -07:00
test_key_guardrail_opt_out.py fix(proxy): gate disable_global_guardrails on keys and teams to proxy admins (#42699) 2026-09-23 18:03:02 -07:00
test_key_guardrail_opt_out_chaos.py fix(proxy): gate disable_global_guardrails on keys and teams to proxy admins (#42699) 2026-09-23 18:03:02 -07:00
test_key_guardrail_opt_out_runtime.py fix(proxy): gate disable_global_guardrails on keys and teams to proxy admins (#42699) 2026-09-23 18:03:02 -07:00
test_object_permission_lookup.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_team_admin_gate.py refactor(proxy): answer team admin checks with the set of roles a caller holds 2026-09-30 15:27:38 -07:00
test_warmed_policy.py test(integration): pin the team-admin status-code matrix across every management route (#43249) 2026-09-26 11:32:24 -07:00