feat(12.2-03): defer relation work on unsaved records and add child file routes

- record id 0 with X-Session-Key manages deferrable relations: create, link, unlink, delete and pivot edits are held in deferred_bindings
- the record's create save applies relation bindings with the file bindings; an ineligible link is a 422 on the relation-manager field
- child forms upload files through .../records/{child}/files/{field} keyed by X-Child-Session-Key; the child save commits them
- boot refuses a deferrable relation with create whose related model no plugin lists in Models()
This commit is contained in:
Jakub Zych
2026-10-02 19:08:16 +02:00
parent afb05b6ee4
commit fe9e8baaf1
16 changed files with 3643 additions and 436 deletions

View File

@@ -69,9 +69,10 @@ func TestPhase10CSRF(t *testing.T) {
// refresh, logout, settings put, create, bulk-delete, widget action,
// toolbar action, update, delete, link, unlink, file upload, file
// reorder, file caption, file remove, relation child create, update
// and delete, pivot update
if unsafe != 19 {
t.Fatalf("walked %d state-changing routes, want 19: %v", unsafe, router.order)
// and delete, pivot update, child file upload, reorder, caption and
// remove
if unsafe != 23 {
t.Fatalf("walked %d state-changing routes, want 23: %v", unsafe, router.order)
}
loginHandler := router.handlers[login]