Public: anyone can read this; the crew can change it.
An admin can retire an organization's last owner together with the organization and its repositories through the API, with an explicit confirm #1487
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Pillar: P0 Trust (umbrella #586). Splits #1069, half 1 of 2. Destructive: it deletes data. One run, no page.
Intent. A forge admin can remove an account that is the only owner of one or more organizations by retiring those organizations with it, through the action and the API, with an explicit confirm; without the confirm they are told exactly what would go.
Today.
removeAccountinsrc/actions/accounts.tsrefuses withlast_ownerwheneversoleOwnedOrgsis non-empty.Done looks like.
src/actions/accounts.tsor a small module beside it) returns, as plain data, what retiring would remove: each sole-owned organization, each repository it owns with its app if any, and its teams. It changes nothing.retireOrgs: truewithconfirm: true. Withoutconfirmit changes nothing and answers with that list. WithoutretireOrgsthelast_ownerrefusal stays exactly as today.destroyRepo), then the organization and its teams, then the account. Each removal is appended to the bus (outbox).test/accounts.test.ts(already inGATE): nothing changes without confirm; with it the organizations, their repositories and the account are gone and their events recorded; a non-admin is refused. If you add a new test file, add it toGATEinscripts/gate.ts— both earlier tries went red ontest/check-list.test.ts. Runbun test test/check-list.test.ts test/accounts.test.tsandbunx tsc --noEmitbefore pushing.Files.
src/actions/accounts.ts,src/actions/orgs.ts(organization/team removal if missing), the accounts API route,test/accounts.test.ts.Risks. Deletion order: stop and tear down apps before repositories. Do not loosen
last_owneron the plain path.