Organizations

Backed by: @pithy-sh/organization. Scopes: organization:accounts:read · organization:members:read · organization:members:write · organization:accounts:write · organization:ownership:transfer · organization:accounts:suspend · organization:accounts:delete.

What it shows

The organization capability is the model, membership administration and lifecycle are the routes this pane calls, users is where each member’s own account is, and roles and permissions is who may press what.

These are your tenants, not your dashboard organization. Organizations and teams is the account you signed in to; this pane is the organizations in your own project.

The index lists them, a page at a time: name, short name, members, seat limit and standing. State (active, suspended or deleted) is sent to your Worker, so it answers over every organization. Seats (full, or room left) narrows this page only. The overview is how the filter panel works. The record shows one, with its roster.

The standing is active, suspended until a date or until reinstated, or deleted and restorable until a date. A Worker too old to report it is said to be, rather than guessed at.

Fetched live from your D1 and discarded. Nothing is stored here. The reads are on every plan.

Invitations are read on demand

The list holds addresses, so reading it is an act. The record asks for a reason first, sends it in the body of POST …/invitations/list rather than in a URL, and your Worker records the read and the reason. Then it lists what is outstanding, with when each expires. On a Worker older than @pithy-sh/organization 0.12, whose read takes the reason in its URL, the read is drawn locked, saying to upgrade.

Administering the members

Add an existing user at a role, change a member’s role, or remove one. Adding sends no invitation, and removing leaves the person’s own account as it was.

The roles offered are your Worker’s catalog, less its owning role. An owner is never a member a roster act can be pressed on, and ownership moves only through Force ownership, which appears only when your Worker composes ownership. It makes a member the owner at once, with no nomination and no acceptance.

Resend an invitation or revoke one. A resend kills the old link and sends a fresh one, which is never shown here. Creating an invitation is not here, because the kit has no operator route for it.

Rename it, change its short name, or set its seat limit. Lowering the limit below the roster removes nobody; it refuses the next add.

Suspend, reinstate, delete and restore

The act offered follows the standing, as it does for a person on the Users record.

The member cascade is a choice, and none is chosen. Suspending or deleting an organization can also act on its members’ own accounts, but only those whose only organization this is: sole. Choosing sole asks your Worker who it would reach, and the question lists every member it would reach and every one it would leave alone, each with the reason, before you can confirm. Nothing is written by that preview.

After the write, the record shows the cascade your Worker ran, not the preview, because what ran is the record of what happened.

A reinstatement or restore names every member whose own account is still shut, each linked to their Users record, where it is reinstated or restored on its own.

Delete is soft unless you choose hard. Soft shuts it now and leaves it restorable until the purge, with every membership it had. Hard is irreversible, and it is sent only after you type the organization’s short name. A legal hold on it is a fact on the record, read with retention:read.

Every act asks why

Each lifecycle and membership act asks for a reason, says what it will do, and confirms once. A refusal from your Worker is said by name and the question stays open on it. After a write, the record reads the organization and its roster again.

Each needs its own scope, granted on the connection, and a scope the connection lacks is named rather than sent. Delete and restore are deletes, so they are an owner’s; an admin sees them locked. Suspend, reinstate and the membership acts are an admin’s.

They are on the Team plan. On Free or Solo each act is drawn locked, saying what Team buys. The index, the record and the roster stay readable.

Every action here is audited

In your trail, under the control-plane actor kind, carrying the connection id and the dashboard user’s own subject.

And in ours, as customer/organization_suspended, customer/organization_deleted, customer/organization_restored, customer/organization_edited, customer/membership_changed, customer/invitations_read, customer/invitation_changed and customer/ownership_transferred, with who pressed it, the organization’s id, the reason, and the counts of a cascade. Never a name, an address or who a cascade reached.

ESC