Function: requireAccess()
requireAccess(
domain):Promise<CurrentAdmin>
Defined in: src/server/auth/access.ts:73
Page/Server-Component guard: redirect a current admin who can't access domain (to /login if not
signed in, else /admin). Returns the admin so the caller can use it. The first line of defense; a
mutation in a server action should still re-check with requireOwner/domain checks where relevant.
Parameters
domain
"billing" | "overview" | "business_dev" | "recruiting" | "onboarding" | "team" | "time" | "payroll" | "insights" | "settings"
Returns
Promise<CurrentAdmin>