Files
Nexus/docs/changelog/2026-06-01-files-ownership-permission-ui.md
2026-07-08 22:31:31 +08:00

41 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog:文件管理归属列 + 权限对话框 + 统一 sudo 回退
| 项 | 内容 |
|----|------|
| 日期 | 2026-06-01 |
| 设计 | `docs/design/specs/2026-06-01-files-root-ownership-ui-design.md` |
## 变更摘要
- 新增 `remote_shell.py``exec_ssh_command_with_fallback``sudo -n` 自动重试)
- `browse` 返回 `owner` / `group` / `mode_octal`
- `chmod` API 支持可选 `owner`/`group`,走 sudo 回退;审计 `file_permission_change`
- `file-ops`、剪贴板复制/移动、解压接入 sudo 回退
- 前端:「归属」列 + `FilePermissionDialog`(预设 644/755 等)
- 运维示例:`docs/deploy/nexus-files-sudoers.example`
## 涉及文件
- `server/infrastructure/ssh/remote_shell.py`(新)
- `server/utils/unix_ls.py`(新)
- `server/infrastructure/ssh/remote_archive.py`
- `server/api/sync_v2.py`
- `server/api/schemas.py`
- `frontend/src/components/FilePermissionDialog.vue`(新)
- `frontend/src/utils/fileMode.ts`(新)
- `frontend/src/pages/FilesPage.vue`
- `frontend/src/types/api.ts`
- `frontend/src/utils/fileBrowse.ts`
- `tests/test_unix_ls.py`(新)
## 验证
```bash
pytest tests/test_unix_ls.py tests/test_posix_paths.py -q
ruff check server/infrastructure/ssh/remote_shell.py server/utils/unix_ls.py server/api/sync_v2.py
```
## 部署
- 后端 + 前端构建上传;目标机按需安装 `nexus-files.sudoers.example`