fix: grant file access for knowledge attached to shared workspace models (#22151)

This commit is contained in:
Classic298
2026-03-02 18:08:49 -05:00
committed by GitHub
parent 10baa6e781
commit 65fbbf5e35
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -1831,7 +1831,7 @@ async def query_knowledge_files(
elif item_type == "file":
# Individual file - use file-{id} as collection name
file = Files.get_file_by_id(item_id)
if file and (user_role == "admin" or file.user_id == user_id):
if file:
collection_names.append(f"file-{item_id}")
elif item_type == "note":