Repository navigation
Ridu v0.22.0
Ridu 0.22.0
Collection lists read only the fields they show, so a long rich-text body no longer travels with
every row. select no longer changes what field read rules and read hooks see, which closes a way
around rules that check another field. Lists read per-row permissions in batches.
Security
- A field read rule that checks another field of the same document, like the
membersOnlyexample
in the access-control guide, could be bypassed withselect. Ridu removed the unselected fields
before it ran read rules and read hooks, soselect={"url":true}hidmembersOnlyfrom the
rule. A rule that treats a missing value as allowed then returned the field. Related documents
loaded with a targetselectinpopulatehad the same gap. When a collection has read hooks or
field read rules, Ridu now reads the whole stored document, runs them, and only then keeps the
selected fields.
Breaking changes
- Custom list cells (
listCellRenderers) and list layouts (listResultsRenderers) receive
documents holding only the ID, timestamps, title field, visible columns and the fields they
declare. A cell or layout that reads any other field must name it in the newfieldsoption,
for examplefields: ['status']. Ridu checks the names when it builds the admin. See
Custom table cells and
Show collection results as cards.
Changes
- The admin collection list reads only what it shows: each document's ID, timestamps, title field
and visible columns, the parent field in a hierarchy, and the fields that custom cells or a list
layout declare. Search, filters and sorting still run in the database on any field. See
Browse content. - Relationship and upload fields named in
fieldsarrive as the related document's ID and title,
like a relationship column, whether or not their column is visible. A custom cell's ownvalue
is always the saved value. - A list page records the columns and fields it was read for. When a navigation brings a page read
for another column layout, for example after another tab saved its own, the list reads it again
instead of showing empty cells. - Lists with
includeAccessand the admin's select-all read per-row permissions in batches: one
read for the page's documents, and one for each distinct predicate a filtered access rule
returns, instead of reads for every row. A 10-row page whose update and delete rules return
filters makes 3 reads instead of about 30.readVersionson a versioned collection is still
counted for each row.
Upgrade
Update the Go module and all Ridu npm packages to 0.22.0 together, and rebuild the admin and
application binary.
If a custom list cell reads document fields other than its own column, or a list layout reads
anything besides the title, add those field names to the registration's fields. Reads that
select fields from a collection with read hooks or field read rules now read whole documents
internally; responses change only where a rule now sees the fields it checks.
Ridu requires Go 1.26.9 or newer. Go 1.27.0 and 1.27.1 meet that minimum but still have the
standard-library vulnerabilities described in the 0.20.0 notes, so build and deploy with Go 1.26.9
or a later 1.26 release, or with Go 1.27.2 or later.