MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / orgHasNoMembers

Function orgHasNoMembers

apps/host-selfhost/src/auth/better-auth.ts:337–341  ·  view source on GitHub ↗
(gate: SignupGate)

Source from the content-addressed store, hash-verified

335
336// True when the single org has no members yet — the unclaimed first-run state.
337const orgHasNoMembers = async (gate: SignupGate): Promise<boolean> => {
338 const auth = gate.getAuth();
339 if (!auth) return true;
340 return (await countOrgMembers(auth, gate.organizationId)) === 0;
341};
342
343const createAuthInstance = (client: Client, getOrganizationId: () => string, gate?: SignupGate) =>
344 betterAuth(makeAuthOptions(client, getOrganizationId, gate));

Callers 1

makeAuthOptionsFunction · 0.85

Calls 1

countOrgMembersFunction · 0.85

Tested by

no test coverage detected