mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: arena access control
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user