export async function readNote(request, services) {
const actor = await services.session.actor(request);
const noteId = request.params.noteId;
await services.access.requireReader(actor, noteId);
return services.notes.readVisible(actor.id, noteId);
}
example/security/session.tsThe route passes an actor and the requested note identifier into an access check.
Identity appears relevant to this operation. The session resolver’s failure behavior must also be inspected.
