mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 19:23:42 +08:00
Global transformation templates (workspace_id IS NULL, e.g. the 7 built-in starter packs made global by V165) were shared across every workspace but not actually read-only: any workspace member could edit or delete them, mutating/affecting all workspaces, with deletes unrecoverable (Flyway seed runs once). - Controller: reject update/delete of null-workspace templates with 403 (err.wiki.global_template_readonly); read/apply paths unchanged. - Service: defense-in-depth — update/delete also reject global templates, guarding non-HTTP callers (WikiTool LLM entry points). delete() now checks the entity before deleting instead of deleting blindly. - findByName: add deterministic ORDER BY (workspace_id IS NULL) ASC so a workspace-local template wins over a same-named global one (was LIMIT 1 with no ordering). Consistent across H2/MySQL/Kingbase. - i18n: new err.wiki.global_template_readonly (zh + en). - Tests: +2 controller mock tests (403 on update/delete, no service write), +2 E2E tests (global template stays intact; findByName prefers local). Tests: 10/10 green (4 controller + 6 E2E). |
||
|---|---|---|
| .. | ||
| controller | ||
| hotcache | ||
| job | ||
| metrics | ||
| model | ||
| pipeline | ||
| profile | ||
| repository | ||
| service | ||
| support | ||
| tool | ||
| WikiDomainIntegrationE2ETest.java | ||