mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
chore(proxy): suppress gate findings on team admin check
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
5699aa5798
commit
e45cdb83f0
1 changed files with 2 additions and 2 deletions
|
|
@ -2708,13 +2708,13 @@ async def _validate_update_key_caller_access(
|
|||
user_api_key_cache=user_api_key_cache,
|
||||
check_db_only=True,
|
||||
)
|
||||
if team_obj is None or not (
|
||||
if team_obj is None or not ( # pyright: ignore[reportUnnecessaryComparison] # get_team_object returns None when the team row is missing despite the non-Optional annotation
|
||||
_is_user_team_admin(user_api_key_dict=user_api_key_dict, team_obj=team_obj)
|
||||
or await _is_user_org_admin_for_team(user_api_key_dict=user_api_key_dict, team_obj=team_obj)
|
||||
):
|
||||
raise HTTPException(
|
||||
status_code=403,
|
||||
detail={
|
||||
detail={ # mutable-ok: FastAPI detail contract
|
||||
"error": f"Only proxy admins, team admins, or org admins can call /key/update. "
|
||||
f"user_role={user_api_key_dict.user_role}, user_id={user_api_key_dict.user_id}"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue