Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / startImpersonating

Function: startImpersonating()

startImpersonating(userId): Promise<[true] | [false, string]>

Defined in: admin/src/impersonation.ts:83

Become userId, remembering who to come back as.

Refuses to start a second impersonation on top of a first: nesting makes "stop" ambiguous, and there is no case where it helps.

Parameters

userId

unknown

Returns

Promise<[true] | [false, string]>