We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0d4c3e commit 10daa64Copy full SHA for 10daa64
1 file changed
backend/open_webui/utils/access_control/files.py
@@ -78,8 +78,11 @@ def has_access_to_file(
78
for model in Models.get_models_by_user_id(user.id, permission=access_type, db=db):
79
knowledge_items = getattr(model.meta, "knowledge", None) or []
80
for item in knowledge_items:
81
- if isinstance(item, dict) and item.get("type") == "file" and item.get("id") == file.id:
+ if (
82
+ isinstance(item, dict)
83
+ and item.get("type") == "file"
84
+ and item.get("id") == file.id
85
+ ):
86
return True
87
88
return False
-
0 commit comments