Function: effectiveIdentity()
effectiveIdentity(
real,imp):object
Defined in: src/server/auth/impersonation-codec.ts:31
The EFFECTIVE access identity for the current request. An owner with an active ROLE impersonation is resolved as that staff role; everyone else is themselves. This only ever DOWNGRADES (owner → staff) — a non-owner's impersonation is ignored upstream, so this can never escalate access.
Parameters
real
Pick<CurrentAdmin, "role" | "accessRole">
imp
Impersonation | null
Returns
object
accessRole
accessRole:
string|null
role
role:
"owner"|"staff"