mirror of
https://github.com/open-webui/open-webui
synced 2025-02-01 15:24:25 +00:00
fix: #9003
This commit is contained in:
parent
be665f2a3e
commit
a8f2919e9e
@ -184,9 +184,9 @@ async def delete_model_by_id(id: str, user=Depends(get_verified_user)):
|
||||
)
|
||||
|
||||
if (
|
||||
user.role == "admin"
|
||||
or model.user_id == user.id
|
||||
or has_access(user.id, "write", model.access_control)
|
||||
user.role != "admin"
|
||||
or model.user_id != user.id
|
||||
or not has_access(user.id, "write", model.access_control)
|
||||
):
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
|
Loading…
Reference in New Issue
Block a user