From 0901890994ae10655c122215b2873e5c13dfe555 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 17 May 2026 02:03:58 +0000 Subject: [PATCH] revert: remove unrelated team admins auth change from project_info This auth-widening change to the project_info endpoint was unrelated to this PR's test-infrastructure scope. Reverting so it can be reviewed and shipped on its own. Co-authored-by: Yassin Kortam --- .../management_endpoints/project_endpoints.py | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py b/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py index bc8ceeb45bc..75229bacc8f 100644 --- a/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py +++ b/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py @@ -877,18 +877,15 @@ async def project_info( ) if team: caller_user_id = user_api_key_dict.user_id - if team.admins and caller_user_id in team.admins: - is_team_member = True - else: - for m in team.members_with_roles or []: - m_user_id = ( - m.get("user_id") - if isinstance(m, dict) - else getattr(m, "user_id", None) - ) - if m_user_id == caller_user_id: - is_team_member = True - break + for m in team.members_with_roles or []: + m_user_id = ( + m.get("user_id") + if isinstance(m, dict) + else getattr(m, "user_id", None) + ) + if m_user_id == caller_user_id: + is_team_member = True + break if not (is_admin or is_team_member): raise HTTPException(