Resolve an actor reference — the dual-key seam SoHL uses wherever one
document points at an actor it does not own: a Cohort member's
shortcodeOrUuid, or the cohort a gear item is shared with (issue #76).
A reference is either a UUID (Actor.xxx, or a token-actor path — always
dotted) or a shortcode, the stable, human-written key an author types.
A raw document id is accepted too, so references recorded as ids keep
resolving. The client sees only the actors it has permission for.
Only an Actor is ever returned: a UUID naming some other document (an
Item, a Journal) resolves to undefined, exactly as an unresolvable one
does. Callers therefore never have to re-check what came back, and a
reference typed by hand cannot smuggle a non-actor into a member list.
Parameters
ref: string
The actor reference: a UUID, a system.shortcode, or an id.
Returns any
The referenced actor, or undefined when it does not resolve.
Resolve an actor reference — the dual-key seam SoHL uses wherever one document points at an actor it does not own: a Cohort member's
shortcodeOrUuid, or the cohort a gear item is shared with (issue #76).A reference is either a UUID (
Actor.xxx, or a token-actor path — always dotted) or a shortcode, the stable, human-written key an author types. A raw document id is accepted too, so references recorded as ids keep resolving. The client sees only the actors it has permission for.Only an Actor is ever returned: a UUID naming some other document (an Item, a Journal) resolves to
undefined, exactly as an unresolvable one does. Callers therefore never have to re-check what came back, and a reference typed by hand cannot smuggle a non-actor into a member list.