Member approval — for a true PENDING_APPROVAL member (created by self-registration when the tenant requires approval). Approve/Reject via the inline buttons on the member detail header, or POST /api/membership/members/:id/approve · /reject (guard requireApproverRole). Only PENDING_APPROVAL status is accepted.
Application/prospect approval — for an applicant (prospectStatus=APPLIED, e.g. the seeded pending@demo.membervu.com, status GUEST_ATTENDEE). Approve via the Prospects page (/admin/prospects) → POST /api/membership/admin/applications/:memberId/approve. The member-approve endpoint will reject this user.
Endpoints (mounted at /api/membership):
POST /api/membership/members/:id/approve · /reject — member approval (PENDING_APPROVAL only)
POST /api/membership/admin/applications/:memberId/review · /approve · /decline — application/prospect path
GET /api/membership/admin/applications · /admin/prospects — queues
POST /api/membership/members/bulk-approve · /bulk-reject — bulk
Frontend: member detail (inline Approve/Reject) in components/members/MemberDetailHeader.tsx; prospect pipeline pages/AdminProspectsPage.tsx (/admin/prospects). Approval-workflow settings (require-approval, approver roles, min events, signup notifications): /admin/members/settings?tab=workflow (legacy /admin/settings/approval-workflow redirects).
Prerequisites
Tenant configured for manual approval (requireApproval: true) for the member-approval path. There is no seeded PENDING_APPROVAL user — register one via /register.
Login as ADMIN or a role in the tenant's approver list (default includes MEMBERSHIP_MANAGER).
Test Cases
TC-APP-01: View Pending Members
Step
Action
Expected Result
1
Go to Members → All Members → Pending tab (/admin/members?tab=pending).
Members with status PENDING_APPROVAL are listed.
2
Verify applicant details (name, date applied).
Correct.
TC-APP-02: Approve a Pending Member
Step
Action
Expected Result
1
Open a PENDING_APPROVAL member → click inline Approve.
POST .../members/:id/approve. Status → ACTIVE (or PENDING_PAYMENT + dues invoice if autoCreateDuesInvoice is on). Role PENDING_MEMBER → MEMBER. Approval email sent.
TC-APP-03: Reject a Pending Member
Step
Action
Expected Result
1
Open a PENDING_APPROVAL member → inline Reject → type a reason → Confirm Reject.
POST .../members/:id/reject. Status → REJECTED. Rejection email (with reason) sent.
TC-APP-04: Approve an Applicant via Prospects (application path)
Step
Action
Expected Result
1
Go to Prospects (/admin/prospects). Find an APPLIED applicant (e.g. Miguel Fernandez / pending@demo.membervu.com).
Applicant appears in the pipeline (APPLIED / Review stage).
2
Click Move to Review (optional), then Approve → the Approve Application modal opens (select a membership type; optionally create a dues invoice). Confirm.
POST .../admin/applications/:id/approve. prospectStatus → APPROVED; member provisioned per membership type.
3
(Negative) Try the member-approve endpoint on this same applicant: POST /api/membership/members/:id/approve.
Rejected — "only PENDING_APPROVAL members can be approved" (status is GUEST_ATTENDEE).
TC-APP-05: Bulk Approve / Reject
Step
Action
Expected Result
1
From the Pending tab, select multiple pending members → bulk Approve / Reject.
POST .../members/bulk-approve / bulk-reject (guard requireApproverRole). Statuses update accordingly.
TC-APP-06: Approval-Workflow Settings
Step
Action
Expected Result
1
Go to Member Settings → Workflow tab (/admin/members/settings?tab=workflow).
Settings: require-approval toggle, approver roles, min events for invitation, signup notifications (#186 — enable + recipients).