Merge pull request #3047 from BerriAI/litellm_fix_key_delete_bug

[Fix + Test]  key delete bug
This commit is contained in:
Ishaan Jaff 2024-04-15 17:38:25 -07:00 committed by GitHub
commit 756966c8be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 4 deletions

View file

@ -1102,7 +1102,9 @@ async def user_api_key_auth(
allowed_routes = [
"/sso",
"/login",
"/key",
"/key/generate",
"/key/update",
"/key/info",
"/config",
"/spend",
"/user",
@ -5598,7 +5600,7 @@ async def new_user(data: NewUserRequest):
if "user_role" in data_json:
user_role = data_json["user_role"]
if user_role is not None:
if user_role not in ["admin", "app_owner", "app_user"]:
if user_role not in ["proxy_admin", "app_owner", "app_user"]:
raise ProxyException(
message=f"Invalid user role, passed in {user_role}. Must be one of 'admin', 'app_owner', 'app_user'",
type="invalid_user_role",