5+
// can() runs 5 to 10 times per request, so keep the roles for the life of the request.6+
export async function getPermissions(roles: RolesTable, req: Request, userId: string) {7+
const key = `permissions:${req.orgId}`;8+
9+
const cached = req.cache.get(key);10+
if (cached) return cached;Open the case, accuse the line a good reviewer would flag, then see the proof.