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>
18 KiB
Changelog
All notable changes are documented here, following Keep a Changelog and semantic versioning.
[Unreleased]
Added
- Attachment lifecycle SPI (
AttachmentLifecyclePolicy,CollaborationQBitConfig.withAttachmentLifecycle) for retention, registration and mandatory access events; durable upload journal (collaboration_upload_journal, H2/MySQL/PostgreSQL), upload recovery and existing-attachment adoption processes, durable cleanup queue with operator settlement, verified/authenticated delivery (AttachmentDownload,AttachmentContentIntegrityException), media policy, aggregate guard and bounded attachment pagination. Seedocs/ATTACHMENT-LIFECYCLE.md,docs/ATTACHMENT-RECOVERY.md,docs/RETAINED-UPLOAD-JOURNAL.md,docs/ATTACHMENT-PAGINATION.md. - Requires a core whose
QBackendTransactionprovidessupportsRollbackCallbacks()andaddAfterRollbackCallback(Runnable)(not in 4.1.0-RC.21); seedocs/CORE-DEPENDENCY.md. - Feature Settings table action Create rows from configuration: writes the code configuration out as editable
collaboration_feature_settingrows (insert-only, only when the table is empty, no change in behavior). - Setup card on the Collaboration home: each record feature, whether it is on, for which tables, and where that comes from.
- Host-neutral QBIT help bundle covering tables, fields, sections, built-in actions, the app, widgets and possible-value sources; core registration and
HelpBundleAssertionscoverage replace the temporary help loader. CollaborationTablesGuardrailTestandFeatureSettingsDefaultsTest.
Changed
-
UI API extension collaboration 1.2.0, additive (#54): presence viewers carry
connections(live leases merged into the viewer), snapshots carryleaseCount, andGET /presence?perConnection=trueaddsleases, one viewer per connection with an opaqueconnectionId,mode,fieldName,sessionIdandsince.presence.changedevents always carryleaseCountandleases. Leases keep an opaque HMAC-SHA256 session id (secretQQQ_PRESENCE_SESSION_SECRETor random per process), never the session uuid, which is a bearer credential.PresenceRegistry.connectionCounts()counts leases next to the unchanged usercounts(); the Who's here card shows both. -
UI API extension collaboration 1.1.0 (requires QQQ 4.1.0-RC.15, UI API 1.6.0): operationIds, standard error responses with BasicErrorResponseV1, extension tags and published presence request/snapshot/viewer schemas to resolve dangling references. Retain CollaborationErrorV1 as deprecated.
-
Upgrade the default QQQ BOM to
4.1.0-RC.7from Maven Central. -
Register the core followers provider for alerts and other qbits, with event preferences, future-mute exclusion, system reads scoped to one record, and caller-owned recipient access checks.
-
Cache favorite/recent record labels only for FULL field access. Resolve comment/share notification labels per recipient with a table-label-and-id fallback. Use the typed core label-access API for email labels as well.
-
Verify RC.7 timeline audit masking and HIDDEN-field omission through enforced viewer queries, including canaries in values and messages.
-
Switch the optional qbit-email integration to 0.1.0-RC.2 and its published
com.kingsrook.qbits.email.apipackage, preserving templates, categories, idempotency keys, linked records and enqueue-status handling. Narrow the email package allowance to the public API. -
Email through qbit-email 0.1.0-RC.1: new optional dependency and
EmailCollaborationNotifier(templatescollaboration_mention,collaboration_share,collaboration_task_reminder), the default notifier when qbit-email is produced in the instance and nonotifieris configured;NoOpNotifierotherwise. One NOTIFICATION message per recipient, no comment bodies, record labels only when field access allows. NewrecipientEmailResolverconfig hook;CollaborationNotificationgains optionalsourceIdandactorUserId.
Fixed
-
Record search no longer fails for a person who may read a table but may not query the tag or custom field value tables. The Tags field (and each searchable custom field kept in the value table) is a search field of its table, and its search-term expansion is a sub-query on
collaboration_record_tagandcollaboration_tag(orcollaboration_field_value). With the default rules every reader may query those tables, but a host can require a permission of its own on them, and core refuses a whole search for one refused sub-query table: every search of such a table answered403, whatever the text.TagCriteriaExpander.expandSearchTermandFieldCriteriaExpander.expandSearchTermnow ask core whether the session may query those tables (the table READ check core applies to a sub-query) and contribute nothing when it may not, so the table's other search fields still match, and#tagmatches nothing. Nobody gains access: an explicit Tags or custom field criterion on a record list is still refused for such a person, and a person who may query the tables searches as before. -
The record features summary (
GET /table/{tableName}/{primaryKey}/features) no longer fails when shared presence is recovering or unreachable.CollaborationSummaryProviderlet the presence backend's service-unavailable answer escape, so the whole summary answered503(counts, favorite, follow, owner and assignee with it) for one lease lifetime after the first touch of each table's room in a store that had lost its state, and for as long as the store was unreachable. The summary now answers with every other part intact, leavespresenceunset and reportsextensions.presence.status = "unavailable"; an empty or absentpresencewithout that extension still means a room that was read. The Who's here card says presence is temporarily unavailable instead of failing, and one visit now starts the recovery interval of every table's room (it stopped at the first recovering room, so the card needed one visit per table, a lease lifetime apart, before it could show counts). The presence endpoints (/presence,/presence/leases,/presence/leases/renew) are unchanged and keep answering503. -
Favorites and recents accept a table whose custom permission checker tells a read from a write by the type of the action input.
TargetResolverasked whether a table is readable with an untypedAbstractActionInput; such a checker refuses an input it does not recognise, soPOST /recents(which the UI sends on every list and record screen) and starring answered404 Not foundfor people the checker lets read the table. The read is now asked as the query it stands for, asParentRecordAccessalready asks with a get. Who may read a table is unchanged. -
Reads of a table that has no tag assignment no longer query
collaboration_record_tag. Core selects the Tags field for every query or get that names no fields, so each of them (including per-record gets and the stored-record read before an update) ran one assignment statement whether or not the table had ever been tagged: 600 gets of an untagged table ran 600 statements, now none. Each node remembers which tables have no assignment (TaggedTables, coreMemoizationregistered withClusterCaches) forCollaborationQBitConfig.withTagLookupCacheSeconds(default 30, 0 disables); writing an assignment clears it on the node and through the ClusterBus. Tables with assignments are read as before, one lookup per 500 parents. No API or schema change. See "What the Tags field costs a read" in the README. -
Browsing one of the qbit's child tables (comments, tasks, record tags, attachments and the other parent-referencing tables) reads each distinct parent once per result page to authorize its rows, instead of once per row: 61 tasks on two parents ran 61 parent reads, now 2. The check itself and its outcome are unchanged.
-
The retained upload journal's PostgreSQL 17 qualification accepts Amazon Aurora PostgreSQL, which reports
full_page_writes=offand does not let a deployment change it.offis accepted only when the settings query detects Aurora (to_regprocedure('aurora_version()') IS NOT NULL); stock PostgreSQL withfull_page_writes=offis still refused, and every other requirement is unchanged on Aurora. Seedocs/RETAINED-UPLOAD-JOURNAL.md. -
Bounded STRING custom fields carry QQQ's native
ValueTooLongBehavior.ERROR, so a write longer thanmaxLengthis rejected with a field error and the stored value is preserved, instead of passing through unchecked (the QQQ defaultPASS_THROUGH). -
Persisted help content is reloaded after each committed runtime metadata refresh, so sections and fields created by publishing a custom-field definition receive their stored
helpContentrows without a restart. -
QBit metadata reports the Maven artifact version from a filtered resource, including release versions.
-
presence.changedevents and presence snapshots always carryviewers, sending[]once the last viewer leaves, as the schema requires (#52). -
Timeline audit summaries read "Edited by Alice Morgan: Title, Total" or "Created by Alice Morgan" instead of "Record was Edited"; detail rows are unchanged.
-
The demo server chooses its user per browser session (
?user=bob, remembered in a cookie) instead of once per JVM, and sends the person's name to the frontend so it no longer shows Anonymous. -
The share recipient search and mention candidates no longer offer the caller to themself.
-
The demo server configures
frontendBaseUrl, so record links are absolute URLs (the API already returned absolute links once it is set). -
Tag filters accept tag ids as any JSON number or numeric string; other strings remain names.
-
Collaboration home rebuilt from standard KPI and table widgets with empty states; the demo Admin parent app is reachable so Collaboration appears in the app tree.
-
Dependent possible values for comment parents (thread root/replies), feature-setting scope names (apps/eligible tables/instance), and comment field anchors (session-visible fields), with RC.5 action-level tests.
Added
-
Phase f custom-field designer: audited definitions, secured EAV children, runtime JSON-path fields, classification, validation, lifecycle actions, PostgreSQL probes/index jobs and migration DDL. Read-only EAV filters and scalar multi-select limitations are documented.
-
Phase g presence: typed POST/DELETE/GET endpoints, 45-second leases, tab merging, a 50,000-entry cap, internal bus replication, record/table events, summaries and the admin-only Who's here card.
-
Designer, HTTP, two-pod, clock and JDBC-boundary tests; regenerated contract and existing Checkstyle/JaCoCo gates retained.
-
Collaboration UI API extension
1.0.0: 45 typed operations for favorites, recents, attachments, tags, comments, mentions, follow, timeline, people, sharing, access requests, tasks, assignment, My work and presence under/qqq/v1/qbit/collaboration, enabled by default and disabled withwithUiApi(false). -
Real multipart uploads; download/preview return five-minute
{url}responses (clients follow url) because the framework cannot describe a redirect Location header. Configurable attachment storage adapter supports in-memory HTTP tests. -
Versioned
ToSchemawire types, enum values, semantic parameter descriptions, generated OpenAPI fragment and drift check; real HTTP tests cover all operations, paging, parent visibility, permissions, validation and storage failures. -
Shared HTTP page bounds of 1-100 (default 20); comments/timeline keyset cursors and offset cursors for complete-list services. People/vocabulary remain bounded searches, while recents/mention candidates retain their 50-item service windows.
-
Client validation now uses QQQ bad-request exceptions, preserving standard 400/403/404 mapping and identical missing/invisible-parent errors. Active-person lookup added to the directory service.
Changed
-
Adopt core feature overrides, record capabilities and implied WRITE locks, reference metadata, mirrored locks, after-commit cleanup and summaries. Core registers feature permissions in the policy editor.
-
Replace
OtherUserAccess/UserSessionSupplierwithCollaborationRecordAccessCheckerand coreUserSessionProviderInterface; configurewithUserSessionProvider. -
Remove
ParentTableRestrictionandTagFilterTranslator; runtimecollaborationTagsfiltering/search uses core subqueries. Retain the unpinned visibility fallback still missing from core. -
Publish identifier-only realtime hints after commit. Selectable Tags output awaits a core hook; the followers SPI is adopted above.
-
Build against locally installed QQQ
4.1.0-SNAPSHOTuntil RC.6 is released;qqq-middleware-javalinis a compile dependency. Object storage remains pinned to0.1.0-RC.2.
Previously added
-
Phase-h links, share previews, recipient-safe notifications and SHARED followers; access requests with requester/admin locks, duplicate OPEN handling, optional permission-holder directory and streamed Mark granted/Decline outcomes.
-
Phase-i tasks with assignee validation, injectable-clock reminder/overdue receipts, complete/reopen/cancel, due-date cursor paging and streamed task actions.
-
Qbit owner/assignee services, configured Assign to/Take ownership bulk actions, My work summaries and mention read receipts.
-
Four audited tables, task-title search metadata, work/share home cards, committed parent-delete cleanup, PostgreSQL tables/indexes and a mention readAt migration.
-
Acceptance tests for security, notifications, request existence neutrality, actual streamed actions, reminders, summaries, cleanup and schema. Existing JaCoCo gates retained; UI API endpoints remain separate.
-
Phase-d tag vocabulary and record assignments on QQQ 4.1.0-RC.5; normalized names, FREE/APPROVED_ONLY policy resolved from system-read scoped feature settings, explicit global/manage permissions, parent-checked idempotent assignment, usage counts and TAGGED/UNTAGGED activity without follower notifications.
-
Tags navigation, secured Record Tags child list, FIELD audit, label search, approved/scoped table PVS, streamed Approve/Merge/Delete and configured host Add/Remove actions, parent cleanup and real Tags home metrics. Bulk multi-select intent is exposed in picker metadata for the separate Next UI implementation.
-
Standalone
TagFilterTranslatorfor IN/CONTAINS_ALL/NOT_IN/IS_BLANK/IS_NOT_BLANK with a 10,000 matching-ID cap. Filter/quick-search integration lands after QRun-IO/qqq#1140 is released. -
Tag service, security, vocabulary, settings, schema, cap and streamed Review/Result tests; existing JaCoCo gates retained.
-
Phase-e comments/mentions, one-level threads, edit revisions, author/admin soft deletion, resolve/reopen, ranked mention candidates and keyset pagination on QQQ 4.1.0-RC.5.
-
Comments, Comment History, Mentions, Followers, Activity and durable Follow Digests tables, child-list widgets, service-only writes, shared parent-table query restrictions, schema indexes and real home counts.
-
Lazy people-directory upserts with ten-minute throttling from comments/follow/favorites/recents/attachments entry points; bounded active-name/email search.
-
Configurable notifier and recipient-session stand-ins, default no-op and recording transports, conservative unknown-access handling and RC.5 after-commit delivery with fresh access checks.
-
Follow preferences, generic streamed ETL Follow/Unfollow actions, configured RC.5 change listeners and a hidden minute scheduler for five-minute digests.
-
Timeline merging enforced core audit reads with collaboration activity, field-visibility filtering and tuple cursors. Attachments now record FILE_ADDED/FILE_REMOVED activity.
-
Memory-backed tests for recipient access, transactions, moderation, pagination, real ETL Review/Result, digest batching, directory ranking, schema and audit timeline security. Existing JaCoCo gates retained.
-
Phase-c attachments against QQQ 4.1.0-RC.5 and object storage 0.1.0-RC.2: parent-checked upload/list/download/rename/describe/delete service, bounded streaming, SHA-256 and configurable byte/extension limits.
-
Visible
collaboration_attachmenttable, FIELD auditing, file-name/description search fields, virtual presigned FILE_PREVIEW/FILE_DOWNLOAD adornments, PostgreSQL BIGINT size and parent index, and an approximate count/bytes home card. -
Temporary
ParentRecordAccess, readable-table query restriction through RC.5's permission hook and parent post-filtering. Panel calls do not require the admin browse grant; direct attachment table writes are service-managed. -
Streamed ETL Delete attachments Review/Result record action and retryable
AttachmentCleanup.onParentsDeletedcallback. No Attach files table action; uploads now use the versioned UI API and cleanup registration awaits core. -
Memory-backed attachment/security/process tests. Thumbnails use FILE_PREVIEW;
thumbnailKeyremains nullable/unused because object storage has no generator. -
Repository scaffold; feature settings and people tables.
-
Phase-b favorites and recents on QQQ 4.1.0-RC.5: visible
collaboration_favoriteandcollaboration_recenttables, target-type possible values, unique personal targets and audit disabled for high-volume data. -
CollaborationSecurityowner locks based on the session user's ID reference, with admin all-access keys and automatic initialization before enforced table actions and in services/home. No collaboration permission is required to manage one's own rows. -
FavoritesServiceandFavoriteEntry: idempotent star/unstar, reorder/folders, refreshed labels, batched record visibility checks, unavailable-target redaction and Next UI paths. -
RecentsService: persisted one-minute throttling, visible newest-first lists (up to 50), and hidden dailycollaborationTrimRecentsscheduling with configurable per-user retention (default 200). -
Home row/distinct-user summaries, PostgreSQL 15+ unique indexes that treat null record IDs as equal, and memory-backend security/service/retention tests.