Compare commits

...
Author SHA1 Message Date
CI 78cc0b741d Bump version to 1.0.0-RC.14 [skip ci] 2026-11-28 00:24:39 +00:00
james.maes 954202232a Merge develop into release/1.0 (promote QQQ 4.1.0-RC.40)
maven / build (push) Successful in 5m36s
build / maven (push) Successful in 7m4s
2026-11-27 18:12:01 -06:00
james.maes b108312448 Merge pull request 'chore: update to qbit-build-parent 2.3.0-RC.1 and QQQ 4.1.0-RC.40' (#54) from chore/qqq-4.1.0-rc40 into develop
maven / build (push) Successful in 3m46s
build / maven (push) Successful in 4m52s
2026-11-27 23:48:29 +00:00
james.maesandClaude Sonnet 5.5 fb7a24b2aa chore: update to qbit-build-parent 2.3.0-RC.1 and QQQ 4.1.0-RC.40
maven / build (push) Successful in 3m23s
build / maven (push) Successful in 3m23s
Bump the qbit-build-parent to 2.3.0-RC.1 and QQQ to 4.1.0-RC.40. Also adapt TableSecurityMatrixTest to QQQ 4.1.0-RC.40 write enforcement: denied deletes and non-editable-field updates now throw instead of being ignored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 17:31:42 -06:00
james.maes 8573578aed Merge pull request 'feat: Transfer Notebook action; a notebook's owner is not set by a save' (#52) from fix/transfer-notebook-owner into develop
maven / build (push) Successful in 3m26s
build / maven (push) Successful in 3m32s
2026-11-24 15:09:18 +00:00
james.maesandClaude Fable 5.2 f19cc4eb25 docs(upgrade): who gets which answer when a save changes a notebook's owner
maven / build (push) Successful in 2m2s
build / maven (push) Successful in 2m2s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 06:11:20 -06:00
james.maesandClaude Fable 5.2 f8638c31a5 feat: Transfer Notebook action; a notebook's owner is not set by a save
maven / build (push) Successful in 1m58s
build / maven (push) Successful in 1m58s
An administrator gave a notebook to another owner by updating ownerUserId, a
field the table declares not editable; the notebook customizer let it through.
A QQQ core that refuses a person's write of a field that is not editable
refuses that save, so the transfer stops working there.

A transfer is an action, not an edit. New record action
sqlWorkbenchTransferNotebook on a notebook, for holders of the admin
permission: NotebookService.transfer checks the administrator again, writes
the owner as the qbit's own write (system input source) in the
administrator's session, with the record locks, and appends a version
"Transferred from A to B" saved by the administrator; the record audit
carries the same note. The field stays not editable, so every client shows it
read-only and none needs a special case.

The customizer now refuses a save that would change the owner, for everyone,
with a message naming the action, so the behaviour is the same on a core with
the rule and on one without. A save that sends the stored owner back is
stored.

Tests over real HTTP (the UI API process and table routes):
NotebookTransferHttpTest. They pass on the pinned core and on a locally built
core with the rule.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 04:57:20 -06:00
james.maes 54775e3444 Merge pull request 'feat: table standard dates, modifyDate on every table' (#50) from feat/table-standard-dates into develop
maven / build (push) Successful in 3m59s
build / maven (push) Successful in 3m59s
2026-11-20 15:57:57 +00:00
james.maesandClaude Fable 5.2 3f7f41312a feat: table standard dates, modifyDate on every table
maven / build (push) Successful in 4m2s
build / maven (push) Successful in 4m2s
Every table has createDate and modifyDate (DATE_TIME, not editable, QQQ
CREATE_DATE / MODIFY_DATE behaviors). Adds modifyDate to the notebook version,
result snapshot and execution tables, with an append-only upgrade block in
docs/ddl/postgres.sql, upgrade notes and tests.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 08:42:38 -06:00
2 changed files with 11 additions and 8 deletions

No files matched your search

+4 -4
View File
@@ -18,10 +18,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<properties>
<qqq.version>4.1.0-RC.26</qqq.version> <!-- feeds qbit-build-parent's qqq-bom-pom import -->
<qqq.version>4.1.0-RC.40</qqq.version> <!-- feeds qbit-build-parent's qqq-bom-pom import -->
<qbit.guardrails.enforce>true</qbit.guardrails.enforce>
<qbit.guardrails.strictUiApiRoutes>true</qbit.guardrails.strictUiApiRoutes>
<revision>1.0.0-RC.13</revision>
<revision>1.0.0-RC.14</revision>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<jacoco.version>0.8.15</jacoco.version>
@@ -32,7 +32,7 @@
<parent>
<groupId>com.kingsrook</groupId>
<artifactId>qbit-build-parent</artifactId>
<version>2.2.1</version>
<version>2.3.0-RC.1</version>
</parent>
<groupId>com.kingsrook.qbits</groupId>
@@ -265,7 +265,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<qqq.snapshot.version>4.1.0-RC.26</qqq.snapshot.version>
<qqq.snapshot.version>4.1.0-RC.40</qqq.snapshot.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -384,7 +384,7 @@ class TableSecurityMatrixTest extends BaseSqlWorkbenchTest
QContext.getQSession().withPermission(table + ".insert").withPermission(table + ".edit").withPermission(table + ".delete");
Integer id = v1Query(table).get(0).getValueInteger("id");
assertThatThrownBy(() -> v1Update(table, id, Map.of("comment", "rewritten", "sqlText", "rewritten"))).as(user + " update " + table).isInstanceOf(QException.class);
assertThat(v1Delete(table, id)).as(user + " delete " + table).isZero();
assertThatThrownBy(() -> v1Delete(table, id)).as(user + " delete " + table).isInstanceOf(QException.class);
assertThatThrownBy(() -> tableInsert(table, Map.of("notebookId", ids.get("Private"), "versionNumber", 99, "executionUuid", "x"))).as(user + " insert " + table).isInstanceOf(QException.class);
}
}
@@ -393,7 +393,7 @@ class TableSecurityMatrixTest extends BaseSqlWorkbenchTest
login(OWNER);
QContext.getQSession().withPermission(SqlWorkbenchResultSnapshot.TABLE_NAME + ".insert");
assertThatThrownBy(() -> tableInsert(SqlWorkbenchResultSnapshot.TABLE_NAME, Map.of("notebookId", ids.get("Private"), "resultJson", "{\"forged\":true}")))
.isInstanceOf(QException.class).hasMessageContaining("pinned from the notebook");
.isInstanceOf(QException.class).hasMessageContaining("cannot be added");
Integer snapshotId = v1Query(SqlWorkbenchResultSnapshot.TABLE_NAME).get(0).getValueInteger("id");
assertThat(v1Update(SqlWorkbenchResultSnapshot.TABLE_NAME, snapshotId, Map.of("label", "Payroll")).getValueString("label")).isEqualTo("Payroll");
assertThatThrownBy(() -> v1Update(SqlWorkbenchResultSnapshot.TABLE_NAME, snapshotId, Map.of("rowCount", 999))).isInstanceOf(QException.class);
@@ -440,7 +440,9 @@ class TableSecurityMatrixTest extends BaseSqlWorkbenchTest
// notebook edits through the table: versioned; visibility //
// and system fields cannot be set directly //
///////////////////////////////////////////////////////////////
v1Update(SqlWorkbenchNotebook.TABLE_NAME, id, Map.of("description", "via the table", "currentVersion", 99));
v1Update(SqlWorkbenchNotebook.TABLE_NAME, id, Map.of("description", "via the table"));
assertThat(currentVersion(id)).isEqualTo(5);
assertThatThrownBy(() -> v1Update(SqlWorkbenchNotebook.TABLE_NAME, id, Map.of("description", "forged version", "currentVersion", 99))).isInstanceOf(QException.class).hasMessageContaining("Current Version cannot be changed");
assertThat(currentVersion(id)).isEqualTo(5);
assertThatThrownBy(() -> v1Update(SqlWorkbenchNotebook.TABLE_NAME, id, Map.of("visibility", "SHARED"))).isInstanceOf(QException.class);
assertThatThrownBy(() -> v1Update(SqlWorkbenchNotebook.TABLE_NAME, id, Map.of("title", " "))).isInstanceOf(QException.class);
@@ -581,7 +583,8 @@ class TableSecurityMatrixTest extends BaseSqlWorkbenchTest
Integer shareId = shareOf(notebookId);
login(OWNER);
QRecord retargeted = v1Update(SqlWorkbenchNotebookShare.TABLE_NAME, shareId, Map.of("audienceId", GROUP_MEMBER, "audienceKey", "all", "createdByUserId", "forged"));
assertThatThrownBy(() -> v1Update(SqlWorkbenchNotebookShare.TABLE_NAME, shareId, Map.of("audienceId", GROUP_MEMBER, "audienceKey", "all", "createdByUserId", "forged"))).isInstanceOf(QException.class);
QRecord retargeted = v1Update(SqlWorkbenchNotebookShare.TABLE_NAME, shareId, Map.of("audienceId", GROUP_MEMBER));
assertThat(retargeted.getValueString("audienceKey")).isEqualTo("user:reader-4");
login(GROUP_MEMBER);
assertThat(v1Get(SqlWorkbenchNotebook.TABLE_NAME, notebookId).getValueString("title")).isEqualTo("For reader-3");