feat(orgs): company access modes (internal/external), data model + admin UI #6
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/company-access-modes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this is
Phases 1-2 of "company access modes": each organization gains an explicit
internal/externalaccess mode, so an admin can distinguish an internal workforce org (invite-only) from an external, public-facing org, and the setup intent is a first-class, visible choice rather than an implicit one.This lands the data model and the admin UI only. It does NOT yet route public sign-ups into an external org (that is deferred, see below), so today choosing "external" sets the mode, enables the branded public landing page, and locks the member directory to administrators. The actual self-serve join wiring comes in a later change.
Included
access_modecolumn onorganizations(postgres + sqlite), defaulting tointernal, so the migration is behavior-preserving and every existing org (including the seeded Default) stays internal.AccessModeenum: only the exact literalexternalis external; anything unknown degrades to internal, so an unrecognised value never opens a public surface.org.access_mode.changed).Design decisions
Feature::Orgs), and the Default org can never be set external: it is the operator's own internal org. OSS installs keep exactly today's behavior (one internal Default org).access_modeenum is intentionally open (a futurecustomervariant fits without a schema change), keeping the door open for a later B2B-SaaS tenancy model.Deferred (not in this PR)
The self-serve sign-up routing (a registration bound to an external org actually creating membership in that org, with email-verification gating and abuse controls) is deferred. It depends on live Kratos/Hydra behavior that has to be verified against a running stack before the mechanism is committed, and an OIDC review flagged one of those spikes as potentially forcing a mechanism change. It is tracked separately.
Because of that, the external-mode UI copy is forward-looking: it describes self-serve sign-up that becomes fully live with the deferred change.
Verification
cargo clippy --all-targets -- -D warnings: clean.g-org-access-mode.spec.ts) require the live Ory playground stack and were not run here.Known follow-ups
onsubmit="confirm('...')"pattern used across the org settings templates breaks if the interpolated string contains an apostrophe. A pre-existing instance exists in the French team-delete confirm; the new French mode-switch strings were rewritten to avoid it, but the underlying pattern is worth hardening separately.docs/commercial/organizations.mddoes not yet describe access modes.Pull request closed