Data UI Backlog

Directory path edits bypass validation

Adding a directory such as /secret/ creates it correctly, but the record is then editable: renaming /secret/ to secret goes through, and accepting that edit is broken:

Three defects: be-update has no path validation (valid-new-directory runs only on be-insert); the accepted rename desynchronizes DB row, RBAC resource name (update-resource-name follows it), and the on-disk directory (be-update never touches the fs); the delete failure is actually a correct server 400 (valid-existing-file-or-directory rejects the slash-less path) that the frontend deleteSelected swallows (no res.ok check, no alert).

Fix (reject, don't move — moves are a real feature with descendant-row / resource / RBAC rewrite fan-out, out of scope): new valid-updated-directory in be-update (any change to a :path field's value signals; total gate, admin included; called after full-data / before every side effect, so no rollback is ever needed), plus res.ok / alert in deleteSelected (the submitForm pattern). Leaf (file) types are gated identically. Frontend build + new FiveAM suite directory-update-suite (modelbank-test fixture).

Plan: directory-edit-validation-plan.org.

Implemented 2026-10-20 per the plan, no deviations:

Related: "File / directory move (rename)" (MVP Backlog) replaces this gate when real moves land.

Slot
2400
Status
60 Done
Tags
mvp, backend, bug
Contributors
Donnie