mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(proxy_server.py): don't require scope for team-based jwt access
If team with the client_id exists then it should be allowed to make a request, if it doesn't then as we discussed it should return an error
This commit is contained in:
parent
ceabf726b0
commit
c52819d47c
2 changed files with 1 additions and 7 deletions
|
@ -385,12 +385,6 @@ async def user_api_key_auth(
|
|||
raise Exception(
|
||||
f"Admin not allowed to access this route. Route={route}, Allowed Routes={actual_routes}"
|
||||
)
|
||||
# check if team in scopes
|
||||
is_team = jwt_handler.is_team(scopes=scopes)
|
||||
if is_team == False:
|
||||
raise Exception(
|
||||
f"Missing both Admin and Team scopes from token. Either is required. Admin Scope={jwt_handler.litellm_jwtauth.admin_jwt_scope}, Team Scope={jwt_handler.litellm_jwtauth.team_jwt_scope}"
|
||||
)
|
||||
# get team id
|
||||
team_id = jwt_handler.get_team_id(token=valid_token, default_value=None)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue