Commit 54e43db
ADR-0081 (cloud): open org-management basics + retire plugin-org-scoping to enterprise (#2699)
* chore: bump objectui to 195121ade6ec
feat(studio): match form designer/preview column density to the runtime form (#2345)
objectui@195121ade6ec921e5786030093f0b23fc58d02f7
* feat(auth,platform-objects): open single-org org-management basics (cloud ADR-0081 D1)
Single-org deployments had NO way to add a user at all: the invite
affordances hid behind 'features.multiOrgEnabled' gates, and nothing ever
created an organization (OrgScopingPlugin and its default-org bootstrap are
multi-org-gated), so sessions carried no activeOrganizationId and better-auth
organization/invite-member had no org to resolve.
- plugin-auth: ensureDefaultOrganization moves here (open home; the
multi-org seed-ownership step becomes an injectable option that
plugin-org-scoping's wrapper keeps providing), wired in single-org mode on
kernel:ready + after every sys_user_permission_set insert
(autoDefaultOrganization opt-out).
- plugin-auth: default session.create.before hook stamps
activeOrganizationId from the caller's sys_member row (owner-preferred);
host-supplied hooks chain first and win (autoActiveOrganization opt-out).
- platform-objects: member/invitation/team actions re-gate from
'features.multiOrgEnabled' to 'features.organization' (the capability is
always mounted); sys_organization's own create/leave/delete keep the
multi-org gate so the single-org default org stays protected.
- setup nav: new nav_organization entry deep-links to the ACTIVE org's
record page ({current_org_id}); nav_teams / nav_invitations drop the
org-scoping service gate; the Organizations LIST keeps it (multi-org only).
Live-verified single-org via browser: first-run wizard -> default org
(renamed, CJK name) + owner membership + active-org session; invite ->
accept -> change role -> remove, all through better-auth endpoints.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat!: retire plugin-org-scoping — multi-org runtime moves to the enterprise @objectstack/organizations package (cloud ADR-0081 D2)
BREAKING: the open @objectstack/plugin-org-scoping package is removed. The
multi-org runtime (organization_id auto-stamp, per-org seed replay, multi-org
default-org bootstrap) is now the closed-source @objectstack/organizations
package, which keeps registering the historical 'org-scoping' service — the
plugin-security RLS probe and the requiresService nav gates are unaffected.
- cli serve / plugin-dev / verify harness mount it best-effort by name when
OS_MULTI_ORG_ENABLED=true; a missing package WARNS loudly (serve/dev) or
throws an actionable error (verify's explicit multiTenant opt-in) instead
of silently downgrading the RLS posture.
- The open member-management basics are unaffected: plugin-auth's single-org
default-org bootstrap + better-auth invitations (ADR-0081 D1) keep working
without the enterprise package.
- dogfood multi-org RLS gate skips (loudly) when the package isn't linked;
enterprise/cloud CI runs it.
Live-verified: multi-org stack with the enterprise package linked (bootstrap,
second-org create, {current_org_id} nav following org switch) and the
missing-package single-org downgrade warning.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(verify,changeset): keep the verify harness pure single-tenant; drop deleted package from changeset fixed group
- verify harness: pass autoDefaultOrganization: false to AuthPlugin. The
single-org default-org bootstrap (ADR-0081 D1) is a product onboarding
convenience for objectstack dev/serve; running it inside the harness minted
a Default Organization + bound the dev admin as owner, giving every
'single-tenant' fixture an active org — which switched on org-scoped RLS and
reparented seeded rows, breaking the pure single-tenant baseline the dogfood
proofs assert (ADR-0057 identity create, ADR-0062 federation, ADR-0086
two-doors). The bootstrap stays covered by plugin-auth unit tests + browser E2E.
- .changeset/config.json: remove @objectstack/plugin-org-scoping from the
fixed group (package deleted in this branch).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 602053c commit 54e43db
47 files changed
Lines changed: 629 additions & 2490 deletions
File tree
- .changeset
- packages
- cli
- src/commands
- dogfood/test
- platform-objects/src
- apps
- translations
- identity
- plugins
- plugin-auth/src
- plugin-dev
- src
- plugin-org-scoping
- src
- plugin-security/src
- runtime
- verify
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1288 | 1292 | | |
1289 | 1293 | | |
1290 | 1294 | | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1295 | 1299 | | |
1296 | | - | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
1297 | 1304 | | |
1298 | 1305 | | |
1299 | 1306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
62 | 74 | | |
63 | | - | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments