Michael Freno 333ea9a28a fix(p8-003): enforce club membership checks on 7 community endpoints
Enforce requireClubMembership on social.getPost, addComment, comments,
like, unlike, challenges.leave, and challenges.submitProgress so private
club content is not readable/actionable by non-members (was IDOR).

Extract the membership helpers (requireClubMembership,
resolveClubIdFromPost, resolveClubIdFromChallenge) into a shared
dependency-free module (nessa-community-authz.ts) so all membership-gated
endpoints use one implementation and the libsql connection surface is
typed uniformly. Each post/challenge endpoint now resolves the owning
clubId first (NOT_FOUND if the resource is missing) then gates on it.

Add regression tests (nessa-community-authz.test.ts) covering: non-member
FORBIDDEN vs member allowed for all 7 endpoints' resolve→require sequences,
NOT_FOUND for missing post/challenge, and a join→allowed→leave→blocked
integration.
2026-07-22 16:58:08 -04:00
2026-02-09 19:53:50 -05:00
2026-01-21 12:57:58 -05:00
2025-12-22 15:37:47 -05:00
2026-05-28 16:48:06 -04:00
2025-12-17 13:51:13 -05:00
2025-12-16 22:42:05 -05:00
Description
No description provided
130 MiB
Languages
TypeScript 61.3%
JavaScript 36.8%
CSS 1.1%
HTML 0.5%
Shell 0.3%