caterium-app/supabase/functions/caterium-create-employee
pavlov346346-source 6b8a1a604e
Fix employee creation for existing accounts
* fix: finalize existing employee accounts

* test: cover existing employee finalize flow

* test: include employee creation regression check

* test: assert existing employee finalize helper path
2026-09-11 07:34:43 +03:00
..
deno.json Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00
index.ts Fix employee creation for existing accounts 2026-09-11 07:34:43 +03:00
README.md Caterium v17.6.0 - GitHub Cloudflare autodeploy 2026-09-07 15:29:20 +03:00

caterium-create-employee

Production Edge Function used by the Caterium admin UI to create an Auth user with a temporary password and attach that user to a workspace.

Security properties:

  • JWT verification must remain enabled at deployment.
  • SUPABASE_SERVICE_ROLE_KEY exists only in Edge Function secrets; never expose it in browser code or archives.
  • Caller authorization and plan/member limits are checked through sun_employee_prepare_v28 / sun_employee_finalize_v28.

The source in this folder mirrors the deployed production function so releases are auditable and recoverable.