Public: anyone can read this; the crew can change it.

A test pins that an organization never loses its last owner: `personOwners`, `isLastOwner`, `soleOwnedOrgs` #6796

shipped production is serving it opened this has it
opened this

src/core/orgs.ts keeps an org from being left ownerless; no test calls personOwners, isLastOwner, soleOwnedOrgs, lastOwnerSays, isOrgMember or listOrgsForUser directly.

Done when a new test file proves, with orgs of one owner, two owners and an agent on the owners team:

  • [ ] personOwners lists people only, never an agent; isLastOwner is true for the sole person owner and false once a second person owns.
  • [ ] soleOwnedOrgs(user) lists exactly the orgs where that user is the only person owner, and lastOwnerSays names them in words.
  • [ ] isOrgMember and listOrgsForUser agree on membership through any team.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs