fix: arena access control

This commit is contained in:
Timothy Jaeryang Baek
2024-11-18 07:40:37 -08:00
parent 269151cd2c
commit f37d847521
3 changed files with 62 additions and 38 deletions

View File

@@ -958,7 +958,7 @@ async def generate_chat_completion(
status_code=403,
detail="Model not found",
)
else:
elif not bypass_filter:
if user.role != "admin":
raise HTTPException(
status_code=403,

View File

@@ -510,7 +510,7 @@ async def generate_chat_completion(
status_code=403,
detail="Model not found",
)
else:
elif not bypass_filter:
if user.role != "admin":
raise HTTPException(
status_code=403,