Compare commits

...
Author SHA1 Message Date
CircleCI 6a0eae112c Bump version to 1.0.0-RC.5 [skip ci] 2026-10-12 21:28:20 +00:00
james.maesandClaude Opus 5.5 bb43871212 Merge develop into release/1.0 for 1.0.0-RC.5
Users get sql_workbench_result_snapshot.insert, so pinning results works
under core permission enforcement (#16).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:26:05 -05:00
james.maes 4d5139cab6 Merge pull request #16 from QRun-IO/feature/snapshot-insert-permission
fix(permissions): grant result_snapshot.insert to users (pinning under core enforcement)
2026-10-12 16:25:08 -05:00
james.maes 3ca94f7da5 Merge branch 'develop' into feature/snapshot-insert-permission 2026-10-12 16:23:04 -05:00
james.maes cfb176e3ac Merge pull request #17 from QRun-IO/feature/note-burned-rc
docs: note that 1.0.0-RC.3 is a burned republish of RC.2
2026-10-12 16:17:20 -05:00
james.maesandClaude Opus 5.5 c858bcb720 docs: note that 1.0.0-RC.3 is a burned republish of RC.2
A tag build of v1.0.0-RC.2 published 1.0.0-RC.3 with the RC.2 code
(QRun-IO/qqq-orb#20). Add a dated do-not-use entry for RC.3 and move
the unreleased work to 1.0.0-RC.4, the next real candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:13:36 -05:00
CircleCI a0e3c222f7 Bump version to 1.0.0-RC.4 [skip ci] 2026-10-12 21:13:23 +00:00
james.maesandClaude Opus 5.5 e156a710e3 fix(permissions): grant result_snapshot.insert to users (pinning under core enforcement)
Pinning a result inserts a sql_workbench_result_snapshot row as a top-level
action. With QQQ core permission enforcement on, that insert is checked
against the session's permissions, and getUserPermissionNames() granted
only read/edit/delete on snapshots, so every user's pin was denied and
hosts had to grant the insert by hand. Record locks still limit snapshots
to the user's own notebooks.

New test: with enforcement on, the user permission set covers create,
update, run, pin, unpin and delete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:12:25 -05:00
james.maesandClaude Opus 5.5 b531d9c046 Merge develop into release/1.0 for 1.0.0-RC.4
snake_case names (#7), app home and Runner (#9), record developer panel
(#6) and record-screen polish (#14). 1.0.0-RC.3 on Central is an
accidental republish of RC.2, so this candidate is RC.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:10:45 -05:00
james.maes 9ca854e59a Merge pull request #14 from QRun-IO/feature/record-screen-polish
fix(screens): plain child-list labels, backend and cell-type pickers, read-only keys and JSON
2026-10-12 16:08:17 -05:00
james.maesandClaude Opus 5.5 763c0e4352 ci: fix the GA tag filter YAML (no brackets in the flow sequence) [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:01:51 -05:00
james.maesandClaude Opus 5.5 d0153ebd9c Set version to 1.0.0-RC.3 and publish only GA tags [skip ci]
1.0.0-RC.3 is already on Maven Central (an RC tag build republished the previous code), so the next release-branch build must publish the following RC. RC tags no longer trigger a publish (/^v[0-9]+\.[0-9]+\.[0-9]+$/ only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:56:55 -05:00
james.maesandClaude Opus 5.5 0d8af84fbc Bump version to 1.0.0-RC.2 [skip ci]
The orb published 1.0.0-RC.2 but could not push this commit (the
CircleCI deploy key is read only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:39:06 -05:00
james.maesandClaude Opus 5.5 0d06a04953 Merge develop into release/1.0 for 1.0.0-RC.2
Sets <revision> to 1.0.0-RC.1, the version already on Maven Central,
because RC.1's version bump never landed on release/1.0. The orb
increments an existing RC, so this publishes 1.0.0-RC.2 instead of a
duplicate RC.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 12:27:56 -05:00
5 changed files with 43 additions and 6 deletions

No files matched your search

+8 -1
View File
@@ -2,7 +2,7 @@
All notable changes to this project are documented here. The format follows Keep a Changelog; versions follow semantic versioning.
## [1.0.0-RC.3] - Unreleased
## [1.0.0-RC.4] - Unreleased
### Added
- **App home dashboard.** The `sqlWorkbench` app's home is now an information dashboard of real data, read in the viewer's session (permissions and record locks apply): summary tiles and links, runs per day, recent notebooks, recent runs, slowest and failed queries, most-used notebooks, shared notebooks, committed writes, and (workbench admins only) activity by user. Each widget has an honest empty state.
@@ -17,12 +17,19 @@ All notable changes to this project are documented here. The format follows Keep
- **Names follow the owner rule: lowercase snake_case, prefixed with the qbit's name (metadata only, no DDL).** Tables `sql_workbench_notebook`, `sql_workbench_cell`, `sql_workbench_notebook_version`, `sql_workbench_result_snapshot`, `sql_workbench_notebook_share`, `sql_workbench_execution` (they now equal their backend table names); possible-value source `sql_workbench_share_audience_type`; permissions `sql_workbench.*`, `sql_workbench_admin.hasAccess` and `<table>.read` etc.; security key types `sql_workbench_user` (all-access `sql_workbench_all_access`) and `sql_workbench_audience`; joins `sql_workbench_notebook_join_sql_workbench_*`.
- `tableNamePrefix` (and the QBit namespace) is normalized to lowercase snake_case and joined with one `_`.
### Fixed
- **Pinning a result works with QQQ core permission enforcement on.** `getUserPermissionNames()` now includes `sql_workbench_result_snapshot.insert`: pinning is a top-level insert, which core enforcement checks, so hosts no longer need to grant it by hand. Record locks still limit snapshots to the user's own notebooks.
### Deprecated
- `LEGACY_TABLE_NAME` on each entity, `ShareAudienceType.LEGACY_NAME` and `SqlWorkbenchQBitConfig.LEGACY_*` hold the pre-RC.3 names, for migrating stored references only.
### Upgrade from RC.2
- Follow [UPGRADE.md](UPGRADE.md): grant the renamed permissions and rename stored table names (audit, saved views and reports). No DDL.
## [1.0.0-RC.3] - 2026-10-12
**Do not use.** 1.0.0-RC.3 on Maven Central is an accidental republish of the RC.2 code by a tag build; do not use it. The next real candidate is 1.0.0-RC.4. (Cause: QRun-IO/qqq-orb#20; the `publish_release` workflow now runs on GA tags only.)
## [1.0.0-RC.2] - Unreleased
The workbench's data becomes standard QQQ tables, secured by QQQ's own mechanisms instead of being hidden ([#3](https://github.com/QRun-IO/qbit-sql-workbench/issues/3)). Requires QQQ `4.1.0-RC.4` or later ([qqq#1073](https://github.com/QRun-IO/qqq/issues/1073)).
+1 -1
View File
@@ -114,7 +114,7 @@ Everything is denied by default. Two standard QQQ layers apply:
| Role | Grant | What it allows |
|---|---|---|
| User | `config.getUserPermissionNames()`: `sql_workbench.hasAccess`, plus read/insert/edit/delete on notebooks and cells, read on versions, shares and the audit, and read/edit/delete on pinned results | The app, widget and endpoints (read-only SQL, EXPLAIN, schema). Their own notebooks, read-only access to notebooks shared with them or in the library, and their own execution history. |
| User | `config.getUserPermissionNames()`: `sql_workbench.hasAccess`, plus read/insert/edit/delete on notebooks and cells, read on versions, shares and the audit, and read/insert/edit/delete on pinned results | The app, widget and endpoints (read-only SQL, EXPLAIN, schema). Their own notebooks, read-only access to notebooks shared with them or in the library, and their own execution history. |
| Writer | `config.getWritePermissionName()` (`sql_workbench.write`) | Write mode (preview and commit) and EXPLAIN ANALYZE. |
| Sharer | `config.getSharePermissionNames()`: `sql_workbench.share`, plus insert/edit/delete on shares | Sharing their own notebooks with users, groups, or everyone (publishing to the library). |
| Admin | `config.getAdminPermissionNames()`: the user permissions plus `sql_workbench_admin.hasAccess` | The all-access key: every user's notebooks, cells, versions, pinned results (real query data), shares, and the whole execution audit, and editing any notebook. |
+1 -1
View File
@@ -18,7 +18,7 @@
<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>
<revision>1.0.0-SNAPSHOT</revision>
<revision>1.0.0-RC.5</revision>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<jacoco.version>0.8.15</jacoco.version>
@@ -377,8 +377,8 @@ public class SqlWorkbenchQBitConfig implements QBitConfig
/*******************************************************************************
** Every permission an ordinary workbench user needs: the access
** permission, read / insert / edit / delete on notebooks and cells, read
** on versions, shares and the execution audit, and read / edit (label) /
** delete on pinned snapshots. Record locks narrow every one of these to
** on versions, shares and the execution audit, and read / insert (pin) /
** edit (label) / delete on pinned snapshots. Record locks narrow every one of these to
** the user's own (or shared-with-them, for reads) rows.
*******************************************************************************/
@JsonIgnore
@@ -389,7 +389,7 @@ public class SqlWorkbenchQBitConfig implements QBitConfig
addTablePermissions(names, SqlWorkbenchNotebook.TABLE_NAME, "read", "insert", "edit", "delete");
addTablePermissions(names, SqlWorkbenchCell.TABLE_NAME, "read", "insert", "edit", "delete");
addTablePermissions(names, SqlWorkbenchNotebookVersion.TABLE_NAME, "read");
addTablePermissions(names, SqlWorkbenchResultSnapshot.TABLE_NAME, "read", "edit", "delete");
addTablePermissions(names, SqlWorkbenchResultSnapshot.TABLE_NAME, "read", "insert", "edit", "delete");
addTablePermissions(names, SqlWorkbenchNotebookShare.TABLE_NAME, "read");
addTablePermissions(names, SqlWorkbenchExecution.TABLE_NAME, "read");
return (names);
@@ -219,6 +219,36 @@ class NotebookServiceTest extends BaseSqlWorkbenchTest
/*******************************************************************************
** With QQQ core permission enforcement on, an ordinary user's permission set
** (getUserPermissionNames) is enough for the whole notebook flow, including
** pinning a result (a top-level snapshot insert).
*******************************************************************************/
@Test
void testUserPermissionsSufficeWithCoreEnforcement() throws Exception
{
qInstance.setEnforcePermissionsInCoreActions(true);
try
{
Integer id = (Integer) service.create(body("Enforced", List.of(cell("c1", "SQL", "SELECT * FROM person"))), as(READER)).get("id");
service.update(id, Map.of("title", "Enforced v2"), as(READER));
SqlExecutionEngine engine = new SqlExecutionEngine(qInstance, SqlWorkbenchRuntime.get(qInstance));
Map<String, Object> response = engine.execute(ExecutionRequest.readOnly(BACKEND_NAME, "SELECT * FROM person", Map.of()), as(READER));
Map<String, Object> snapshot = service.createSnapshot(id, Map.of("executionUuid", response.get("executionUuid"), "cellKey", "c1"), as(READER), "SELECT * FROM person");
assertThat(snapshot.get("id")).isNotNull();
service.deleteSnapshot(id, (Integer) snapshot.get("id"), as(READER));
service.delete(id, as(READER));
}
finally
{
qInstance.setEnforcePermissionsInCoreActions(null);
}
}
/*******************************************************************************
**
*******************************************************************************/