Skip to main content

Function: getAdminLayoutContext()

getAdminLayoutContext(): Promise<{ admin: CurrentAdmin | null; domains: Set<"billing" | "overview" | "business_dev" | "recruiting" | "onboarding" | "team" | "time" | "payroll" | "insights" | "settings">; isOwner: boolean; viewAs: ViewAsState; }>

Defined in: src/server/auth/access.ts:135

Everything the admin shell needs in one resolve: the REAL admin, the EFFECTIVE owner flag + domains (so the nav reflects the impersonated lens), and the View-as state for the switcher/banner.

Returns

Promise<{ admin: CurrentAdmin | null; domains: Set<"billing" | "overview" | "business_dev" | "recruiting" | "onboarding" | "team" | "time" | "payroll" | "insights" | "settings">; isOwner: boolean; viewAs: ViewAsState; }>