Skip to main content

Invite Members Reference

Frontend behaviour

  • frontend/src/pages/ClubSettings/ClubInvite.js:164 issues POST /c/cbmemb/einv with { emailInvList, cid } for email campaigns.
  • The same component calls POST /c/cbmemb/linv at frontend/src/pages/ClubSettings/ClubInvite.js:190 to mint shareable links, honouring the max invite window constants from src/config.
  • Member search within the dialog uses GET /s/umi/{cid}/{query} (frontend/src/pages/ClubSettings/MembershipTab/index.js:163) to suggest existing Clubiam users.

Backend routes

  • backend/r/cbs.js:182 registers POST /c/cbmemb/einv, sending batched transactional emails and logging invites for audit.
  • Link invites go through backend/r/cbs.js:187 (/c/cbmemb/linv), returning a tokenised URL stored alongside expiry metadata.
  • backend/r/cbs.js:213 (GET /c/cbboard/invlist/:cid) reuses cbMembInvList to list outstanding invitations regardless of origin.

Security & limits

  • Both endpoints require the caller to be president or board with invite_friends/invite_users privileges. The UI hides controls when contentVis or RBAC settings deny access.
  • Requests are debounced server-side to 5 seconds to prevent spamming (debounce helper in cbs.js).
  • Email inputs are normalised and deduplicated client-side before submission. The controller silently drops duplicates and reports them in the response payload for user feedback.

UI feedback

  • Success and error snackbars reuse the theme�s secondary palette, ensuring high contrast across dark and light modes.
  • The invite table auto-refreshes after each operation so moderators immediately see invite status changes.