feat(page-data): owner CRUD, public read, and role policy UI
Expose owner PATCH/soft-delete routes, allow anonymous read/stats on public pages when policy enables read, and add login_required role editor to the ops panel with tests and doc updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,11 +23,10 @@
|
||||
|
||||
```text
|
||||
GET /api/page-data # 列出已注册 dataset
|
||||
GET /api/page-data/:dataset # 读行
|
||||
POST /api/page-data/:dataset/rows # 插入
|
||||
GET /api/page-data/:dataset/schema
|
||||
GET /api/page-data/:dataset/stats
|
||||
GET /api/page-data/:dataset/export?format=json|csv
|
||||
GET /api/page-data/:dataset
|
||||
POST /api/page-data/:dataset/rows
|
||||
PATCH /api/page-data/:dataset/rows/:id
|
||||
DELETE /api/page-data/:dataset/rows/:id # soft delete
|
||||
POST /api/page-data/:dataset/rows/:id/restore
|
||||
|
||||
GET /api/page-data/policies
|
||||
@@ -53,7 +52,7 @@ GET /api/public/pages/:pageId/data/:dataset/schema
|
||||
GET /api/public/pages/:pageId/data/:dataset/stats
|
||||
```
|
||||
|
||||
公开请求可带 `x-page-data-token`(口令/登录会话)。**公开页不能直接传 SQL**,只能提交策略白名单字段。
|
||||
公开请求可带 `x-page-data-token`(口令/登录会话)。**完全公开**模式下:默认仅 insert;若策略显式开启 `read`,匿名访问者可读白名单字段并查看 stats。
|
||||
|
||||
## HTML 页面嵌入
|
||||
|
||||
|
||||
Reference in New Issue
Block a user