Data UI Backlog

Type-level check on row writes

Type-level roles answer one question: may this user create a row of this type (be-insert's only gate). An existing row carries its own roles, so operations on it must be decided solely by the row-role intersection — a role held by the user, sitting on the row, carrying the operation. be-delete already works this way (record-level check only). But be-update checks type-level update first (valid-user-permissions, backend.lisp ~3157 — the "backend standalone safety" comment) and be-action mirrors be-update exactly (type-level update + user-allowed-resource). That's the error: consulting the type resource for an existing row. Remove the type-level check from be-update and be-action so both are row-only, matching be-delete.

Consequences (deliberate, from the 2026-10-22 blog/comments discussion): a creator with create but no type-level update can now edit rows their exclusive role sits on — the creator-edit case. This is what makes creator-only comment editing declarable without a write-carrying ambient role riding every row. Base types are unchanged (user-allowed-resource already degenerates to the type resource when the row has no resources entry); the :tokens carve-out is unchanged (no rows exist). Check tests/update-permission-tests.lisp for expectations that pin the type gate.

Plan: type-level-check-on-row-writes-plan.org

Implemented per the plan end to end:

Slot
3200
Status
60 Done
Tags
backend, bug
Contributors
Donnie, Rose, Grok
Plans
Type-level check on row writes (3), Type-level check on row writes (2), Type-level check on row writes