mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-07 03:48:44 +08:00
fix(go): Add tenant filter to file queries (#16526)
## Summary - Add `tenant_id` filtering to `FileDAO.Query`. - Pass tenant IDs through existing file query call sites. - Prevent cross-tenant filename and folder duplicate checks.
This commit is contained in:
@@ -97,7 +97,7 @@ func (h *FileCommitHandler) resolveDatasetFolderID(datasetID string) (string, er
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
files := h.fileDAO.Query(kb.Name, "")
|
||||
files := h.fileDAO.Query(kb.Name, "", kb.TenantID)
|
||||
for _, f := range files {
|
||||
if f.SourceType == string(entity.FileSourceKnowledgebase) && f.Type == "folder" && f.TenantID == kb.TenantID {
|
||||
return f.ID, nil
|
||||
|
||||
Reference in New Issue
Block a user