Timothy Jaeryang Baek 2 tháng trước cách đây
mục cha
commit
8bc7d85eac
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      backend/open_webui/retrieval/utils.py

+ 3 - 1
backend/open_webui/retrieval/utils.py

@@ -509,7 +509,9 @@ def get_sources_from_items(
             note = Notes.get_note_by_id(item.get("id"))
 
             if note and (
-                user.role == "admin" or has_access(user.id, "read", note.access_control)
+                user.role == "admin"
+                or note.user_id == user.id
+                or has_access(user.id, "read", note.access_control)
             ):
                 # User has access to the note
                 query_result = {