18 Commits

Author SHA1 Message Date
ymq
fd2a52a1a5 fix(rag-perm): file_list/file_serve 维护者也需要看文件列表和下载——maintain或search任一通过 2026-09-02 14:58:43 +08:00
ymq
1c1ef65931 feat(rag): 机构rags目录+容量检查参数化+KB级角色权限
- 存储: 知识库文件存 {workspace_base}/{org}/rags/{kb}/ (机构目录下开设rags目录)
- 容量: rag_check_storage_quota 参数控制是否检查机构上限(默认不检查)
- 权限: rag_knowledge_bases 加 maintain_roles/search_roles; 空=同机构默认可用
  维护入口(upload/delete/rename/tree/tags)校验maintain; 检索入口(search/file_list/file_serve)校验search
- file_serve.dspy: 下载/预览走校验端点, 堵住/idfile/猜路径越权
- 机构隔离: 跨机构KB一律拒绝
2026-09-02 12:09:16 +08:00
ymq
789960a1cf refactor(schema): rag 模块全部数据表加 rag_ 前缀(模块跨应用复用防冲突)
- models/ 重建为正确表定义格式(summary+fields+indexes),覆盖全部 11 个表
  修正原 models/ 误放 CRUD 格式副本(缺 summary)导致 json2ddl 100% 失败被静默忽略
- json/ 6 个 CRUD 定义 tblname 加前缀 + 文件改名
- 129 处 SQL/sor 表名加 rag_ 前缀(URL 路径 knowledge_bases_list 保持不变)
- 新增 init/migrate_rag_prefix.sql 幂等 RENAME TABLE 迁移
2026-08-25 14:24:37 +08:00
371afae84a fix: file list action buttons spacing 6px->14px; drop analysis button; legacy /api/doc/upload now saves via FileStorage (flat files/ layout caused 404) 2026-08-05 12:17:25 +08:00
3cb591ed92 feat: detail.ui face/voiceprint media card popups (DynamicColumn, image/audio playback) + tag buttons on cards and file list rows (tag_form.dspy -> add_tag.dspy, refresh media panel) 2026-08-05 10:55:50 +08:00
0d6acfb4ef feat: analysis cards with face/voiceprint results + tag system 2026-07-31 14:58:21 +08:00
df8d220308 fix: return type consistency + textAlign→halign + remove unused var (Agent 2 review) 2026-07-30 18:24:04 +08:00
c6110522c1 fix: root folder upload __root__ → empty string 2026-07-30 18:00:00 +08:00
5b1fb8e564 fix: try/except around DB queries (Agent 2 review) 2026-07-30 17:43:18 +08:00
448645b0e2 fix: delete reloads file_list.dspy instead of delete response 2026-07-30 17:13:58 +08:00
89cb31897b fix: restore col widths + absolute delete URL + _webbricks_=1 2026-07-30 17:04:49 +08:00
8e1ef924e5 fix: download URL /idfile prefix, delete uses fetch, filename left-aligned 2026-07-30 16:17:20 +08:00
Hermes
f63f742f8e fix: restore del_url line in file_list.dspy 2026-07-30 15:06:20 +08:00
Hermes
c1a8f1643a fix: download URL uses file_path directly (/idfile/{id}.{ext}) 2026-07-30 14:49:19 +08:00
Hermes
908480f35e fix: file_url uses file_path directly with /idfile prefix 2026-07-30 14:24:49 +08:00
Hermes
eed6da7667 fix: file download/view URL uses /idfile/{doc_id}.{ext} 2026-07-30 14:20:22 +08:00
c14588f33b fix: file list truncation+tooltip, fixed column widths, view/download/delete fix 2026-07-29 17:14:38 +08:00
224496ae0e fix: file_list alignment + view/download/delete actions
- Filename: add textAlign left + cwidth columns for type/size/status/date
- View: newwindow → window.open(_blank)
- Download: urlwidget PopupWindow → script anchor download
- Delete: hardcoded path → relative path, refresh with widget list
2026-07-29 16:41:39 +08:00