fix(cabana): safe account action URLs, per-section isolation and the prompted record action contract (B-WR-03, B-WR-05, B-WR-06)

- an account action URL is kept only when it is http(s) with a host or a
  same-origin path; anything else is dropped and logged without the URL
- a failing Status marks its section error: true and a failing Applies
  drops only that action, instead of a 500 for the whole list
- status text goes through localizeDetail (B-IN-03); the non-string
  payload refusal is the phrase key action_prompt_invalid (B-IN-02)
- the record action annotations and pact's prompt doc say what happens
  (B-IN-05 text); admin.json and schema.d.ts regenerated
This commit is contained in:
Jakub Zych
2026-10-23 16:24:34 +02:00
parent 24cf6cd931
commit 44835e4c6b
12 changed files with 80 additions and 29 deletions

View File

@@ -365,7 +365,8 @@ type AdminRecordAction struct {
// shows in its confirm dialog. Label, Placeholder and Comment are phrase keys
// (containing "::") or literal text; Label is required. MaxLength caps the
// value in runes, 0 meaning 255. The admin refuses an empty or over-long
// value with a validation error on the input before the action runs.
// value before the action runs with a 422 on payload, whose message the
// admin SPA shows as a toast; the prompt dialog then closes.
type AdminActionPrompt struct {
Label string
Placeholder string