The Tags field is a search field of every taggable table, and so is each
searchable custom field kept in the value table. Core asks each of them to
expand the search term; the expansion is a sub-query on
collaboration_record_tag and collaboration_tag (or
collaboration_field_value). With the default rules every reader may query
those tables, but a host can require a permission of its own on them. Core
checks table READ for each sub-query table and one refusal refuses the
whole query, so every record search of such a table answered 403 for a
person without that permission, whatever the text.
TagCriteriaExpander.expandSearchTerm and
FieldCriteriaExpander.expandSearchTerm now ask core the same question
first (PermissionsHelper.hasTablePermission with an enforced QueryInput
for the table, the check core applies to a sub-query) and return null when
the session may not query the tables. Core's contract for null is "this
field does not match the term": the other search fields of the table still
match, and a #tag search matches nothing.
Nobody gains access. An explicit Tags or custom field criterion on a
record list is unchanged: it is still refused by core for such a person. A
silent empty result would be wrong for the negative operators (is not,
is blank) and misleading for the positive ones, and the refusal already
names the missing permission. A person who may query the tables searches
and filters as before.
SearchWithoutCollaborationReadTest (memory backend, materialized
sub-queries) and CustomFieldValuesPostgresTest
.searchSurvivesHostProtectedCollaborationTables (PostgreSQL, native
sub-queries) put a host permission in front of each table's own checker:
without it a text search returns the table's own matches, tag and custom
field terms return nothing, nothing throws and the explicit criterion is
refused; with it the results are the same as with the default rules. Both
fail before this change with QPermissionDeniedException on the first
search.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CollaborationSummaryProvider let the shared presence backend's
service-unavailable answer escape, so core's record features summary
(GET /table/{tableName}/{primaryKey}/features) answered 503 as a whole:
counts, favorite, follow, owner and assignee went with it. With the Redis
backend that happened for one lease lifetime after the first touch of each
table's room in a store that had lost its state (the room is "recovering"),
and for as long as the store was unreachable.
The summary now catches only that case, builds every other part as usual,
leaves presence unset and reports extensions.presence.status =
"unavailable". The wire omits empty collections, so an empty and an unset
presence list look the same; the extension is what tells them apart. The
presence endpoints (/presence, /presence/leases, /presence/leases/renew)
are unchanged and keep answering 503.
The Who's here card had the same shape: it now says presence is
temporarily unavailable instead of failing. It also stopped at the first
recovering room, so it needed one visit per table, a lease lifetime apart,
before it could show counts; a recovering room no longer stops the reading
(any other failure still stops it at once), so one visit starts every
room's interval.
The recovery guard is unchanged. RedisPresenceRecoveryTest
.normalUseNeverRestartsRecovery shows that normal use cannot restart the
interval: every write that advances the guard's latest issued expiry also
leaves a table member (a departure marker included) expiring at exactly
that instant, so the room is never empty before it. Open and leave within
the lease lifetime, an abandoned reservation and idle expiry all end in a
known-empty room under the same generation; only real loss of the
projections starts a new one.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>