Review the same work from four perspectives.
Access request handling · version 2
Interactive sample with a fictional access request and preview.
Check permission enforcement
Can a caller use the same endpoint if they lack permission to decide?
Code · access-requests.ts
if (!viewer.canApprove(request.workspaceId)) {
return deny(403);
}
return decide(request, input.outcome);Review lines 1–3 · Authorization check
The workspace is taken from the stored request. Every caller is checked before a decision is written.