mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-16 09:15:54 +08:00
fix: access control
This commit is contained in:
parent
17c9a92767
commit
6906a0bd26
@ -1147,7 +1147,7 @@ async def generate_chat_completions(
|
||||
# Check if user has access to the model
|
||||
if user.role == "user":
|
||||
model_info = Models.get_model_by_id(model_id)
|
||||
if not (
|
||||
if model_info and not (
|
||||
user.id == model_info.user_id
|
||||
or has_access(
|
||||
user.id, type="read", access_control=model_info.access_control
|
||||
|
Loading…
x
Reference in New Issue
Block a user