feat(web): C0 release /admin when disabled; configurable admin_prefix

Stop mounting reserved admin routes when admin=False, nest CRUD under a
configurable prefix, and honor login/logout redirects so custom desks need no JS bypass.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-04 11:50:11 +08:00
1 parent 5f91be7c21
commit 0aa0f47a9d
10 files changed
+375 -90

No files matched your search

@@ -67,6 +67,8 @@
---
## 6. 过渡期作者 workaround(实现前)
## 6. 过渡期 → 已落地
继续用 `/desk` 旁路 + JS 调 `/admin/login`;**实现 C0 后应删除该兜底**,避免双入口长期并存。
~~继续用 `/desk` 旁路 + JS 调 `/admin/login`。~~
**C0 已落地(2026-09):** `admin=False` 可直接 `route path="/admin/…"`;或 `admin=True` + `admin_prefix="/desk"` + `login_redirect` / `logout_redirect`。见金样 `tests/ext/web-c0-admin-prefix.mq.md`。
+1 -1
View File
@@ -2,7 +2,7 @@
| | |
|---|---|
| 状态 | **设计草案(待排期实现)** |
| 状态 | **C0 done · C1–C4 planned** |
| 日期 | 2026-09-04 |
| 问题盘点 | [../../research/ext-web-customization-limits.md](../../research/ext-web-customization-limits.md) |
| 相关 | [../ext-web.md](../ext-web.md) · [../ext-web-net.md](../ext-web-net.md) · [../../roadmap/ext-web.md](../../roadmap/ext-web.md) |