Skip to content

apps/web/src/lib/useCurrentUser.ts ​

Auto-generated by scripts/generate-file-docs.ts. Do not edit — overwritten on every run.

Purpose ​

useCurrentUser — API-sourced user identity and role. Role and status are ALWAYS read from the platform DB via this hook, never from Clerk JWT claims or publicMetadata (ADR 0006; auth-rbac-design §API middleware step 5 — role claims in JWTs are not trusted). AB#3901, AB#3902, AB#3904 /

Exports ​

  • export type UserStatus
  • export type CredentialType
  • export interface CurrentUser
  • export function useCurrentUser
  • export function isAdmin
  • export function isMinister
  • export function canManage

Imports ​

  • ./api
  • @hch/shared-types
  • @tanstack/react-query

Imported by ​

(not referenced in graph, or graph not yet generated)

Heritage Community Hub — Internal. Access restricted via Cloudflare Access + Entra ID.