Skip to content

Commit 7a9d7e5

Browse files
committed
test(runtime): drop the fixture's unused organization id; docs state the sign-up binding rule
Claude-Session: https://claude.ai/code/session_01QSeKYn5CmmdShCJifm6WYj Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7da458b commit 7a9d7e5

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎content/docs/deployment/environment-variables.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Read by `@objectstack/service-print` when `PrintServicePlugin` is composed; see
9797
| `OS_AUTH_EMAIL_PASSWORD_ENABLED` | boolean | settings default | Settings env override for `auth.email_password_enabled`. Controls local email/password login. |
9898
| `OS_AUTH_SIGNUP_ENABLED` | boolean | settings default | Settings env override for `auth.signup_enabled`. Takes precedence over UI settings and is preferred over `OS_DISABLE_SIGNUP`. |
9999
| `OS_AUTH_REQUIRE_EMAIL_VERIFICATION` | boolean | settings default | Settings env override for `auth.require_email_verification`. Under the `open` audience posture, `false` is the deployment's opt-out from the forced verification (one boot warning; see [Email verification under each posture](/docs/deployment/self-hosting#email-verification-under-each-posture)); under `email_domain` it is refused, since verification is forced there. |
100-
| `OS_AUTH_MEMBERSHIP_POLICY` | `auto` \| `invite-only` | `auto` | Settings env override for `auth.membership_policy` — what a newly created user joins (ADR-0093 D1). `auto` binds every new user to the deployment's default organization. `invite-only` grants membership solely through an explicit act: creating a workspace, accepting an invitation, an admin adding them, or SSO just-in-time provisioning. Applies to sign-up **and** to the backfill of pre-existing member-less users. An unrecognized value is rejected with an `error` log and **ignored** — the deployment keeps its current policy rather than silently reverting to `auto`. |
100+
| `OS_AUTH_MEMBERSHIP_POLICY` | `auto` \| `invite-only` | `auto` | Settings env override for `auth.membership_policy` — what a newly created user joins (ADR-0093 D1). `auto` binds every new user to the deployment's default organization, except, under the `invite_only` audience posture, a sign-up admitted by the invitation it presents whose address is unverified, which joins by accepting. `invite-only` grants membership solely through an explicit act: creating a workspace, accepting an invitation, an admin adding them, or SSO just-in-time provisioning. Applies to sign-up **and** to the backfill of pre-existing member-less users. An unrecognized value is rejected with an `error` log and **ignored** — the deployment keeps its current policy rather than silently reverting to `auto`. |
101101
| `OS_ORG_INVITATION_LIMIT` | integer \| `off` | unset (100) | How many **pending** invitations one organization may hold at once. When the organization already holds that many, `POST /api/v1/auth/organization/invite-member` answers `403 INVITATION_LIMIT_REACHED` (`Invitation limit reached`) until an invitation is accepted, rejected, cancelled or expires. Unset keeps the auth library's own limit of 100, so a deployment that sets nothing behaves as before. A positive integer `N` allows `N`. `off`, `unlimited` or `none` (any case) removes the limit, for a host that invites people in bulk. `0`, or any value that is not plain digits (`-5`, `2.5`, `1e3`, `1_000`), reads as unset (100), so a typo never refuses every invitation. The count is per organization, not per inviter. Read when the auth plugin builds its organization plugin, so a change needs a process reload. |
102102
| `OS_AUTH_GOOGLE_ENABLED` | boolean | settings default | Settings env override for `auth.google_enabled`. Requires Google OAuth credentials from Settings or env. |
103103
| `GOOGLE_CLIENT_ID` | string | — | Deployment-level Google OAuth client id for the open-source Google login implementation. |

‎content/docs/deployment/tenancy-modes.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ The reconciler:
243243
- **yields** to any membership that already exists (e.g. one created by an
244244
invitation, `add-member`, SSO provisioning, or a host hook) — it never
245245
creates a second membership;
246+
- does **not** bind, under the `invite_only` audience posture, a sign-up
247+
admitted by the invitation it presents while the account's email address is
248+
unverified: that account joins by accepting the invitation, which needs a
249+
verified address ([Self-hosting](/docs/deployment/self-hosting));
246250
- binds only to an **unambiguous** target org — that is `tenancy.defaultOrgId()`,
247251
which returns the single-org default organization under `single` and `null`
248252
under any walled **request** (invitations, `add-member` and SSO provisioning

‎content/docs/permissions/authentication.mdx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ OS_AUTH_SIGNUP_ENABLED=false
123123
OS_AUTH_GOOGLE_ENABLED=true
124124

125125
# Optional: what a new user joins (ADR-0093 D1). `auto` (default) binds every
126-
# new user to the default organization; `invite-only` grants membership only
126+
# new user to the default organization (except, under the `invite_only`
127+
# audience posture, a sign-up admitted by the invitation it presents whose
128+
# address is unverified: it joins by accepting); `invite-only` grants membership only
127129
# through an explicit act — creating a workspace, accepting an invitation, an
128130
# admin adding them, or SSO just-in-time provisioning.
129131
# Also configurable in Setup → Authentication → Membership.
@@ -1208,8 +1210,8 @@ organization the administrator has switched to in the console. There is no
12081210
organization choice: to add someone to another organization, switch to it
12091211
first. An administrator with no current organization is refused with
12101212
`400 NO_ACTIVE_ORGANIZATION` and no user is created. Under the `single` posture
1211-
(a degraded wall included) the user joins the default organization, as every new
1212-
user does ([Membership](/docs/deployment/tenancy-modes#membership-how-new-users-join-an-organization)).
1213+
(a degraded wall included) the user joins the default organization, as every
1214+
user an administrator creates does ([Membership](/docs/deployment/tenancy-modes#membership-how-new-users-join-an-organization)).
12131215

12141216
The join is better-auth's `addMember`, the same act as **Add Member**, inside
12151217
the account's transaction: an organization at its membership limit refuses the

‎content/docs/permissions/sso.mdx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,11 @@ and no user is created. These sign-ins are unchanged:
748748
- the first human of a deployment that has none yet;
749749
- every sign-in under the `email_domain` or `open` posture.
750750

751+
Admission is not acceptance: accepting an organization invitation needs a
752+
verified email address, and an account an SSO sign-in creates counts as
753+
verified only when the provider verified the address
754+
([Self-hosting](/docs/deployment/self-hosting)).
755+
751756
To let a provider create accounts for everyone its IdP authenticates, as it did
752757
before this rule, turn on `allowJit` for that provider. With
753758
[domain verification](#domain-verification-opt-in) on, a provider still creates

‎packages/runtime/src/declarative-update-refusal-order.pin.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const BOOT_TIMEOUT = 180_000;
6262
const ORIGIN = 'http://localhost:3000';
6363
const API = '/api/v1';
6464
const ADMIN = { email: 'admin@objectos.ai', password: 'admin123' };
65-
const ORG = 'org_pin_30848';
6665
const READER = { email: 'pin-30848-reader@example.invalid', password: 'Reader-Pass-123' };
6766
const EDITOR = { email: 'pin-30848-editor@example.invalid', password: 'Editor-Pass-123' };
6867
const OBJECT = 'pin_step';

0 commit comments

Comments
 (0)