Admin — Phase 2 Admin Surfaces#

A pointer-page for platform admins to find every Phase 2 admin surface and the handbook that goes with it.

Who this is for: anyone with the platform admin role.

Where things live#

SurfaceAdmin routeOperational handbook
Groups + chapters/admin/groupsGroup admin handbook
Mentorship programmes/admin/mentorship, /admin/mentorship/programmes/new, /admin/mentorship/programmes/<id>Mentorship operations guide
Marketplace deals/admin/marketplace/dealsMarketplace partner-onboarding workflow
Marketplace partners/admin/marketplace/partners(same)
Staff leave queue/admin/staff/leave-requestsThis page (see below)
CMS announcements/admin/cms/announcementsdocumentation/campus-tab-and-chapter-events.md
Audit logs/admin/audit-logs(Phase 1)

Admin capabilities (Phase 2)#

backend/internal/auth/capabilities.go defines four named capabilities used by Phase 2 services:

  • groups.create — required to create a chapter (kind=chapter). Interest groups do not require this; any verified user can create one.
  • groups.moderate — platform-level group moderation (suspend/restore, transfer ownership, override member roles).
  • mentorship.match — required to call RunMatching and to access /admin/mentorship.
  • marketplace.curate — required for partner CRUD and deal CRUD.

All four are gated on the platform admin role today; per-group overrides for groups.moderate come from MembershipRole == admin/moderator on the relevant group, not from the platform capability. See auth.HasCapability in backend/internal/auth/capabilities.go.

Staff leave approval queue#

/admin/staff/leave-requests lists every submitted leave request. For each:

  1. Open the request — see staff name, leave type, dates, reason, current balance.
  2. Approve or Decline. Approve writes the audit row and decrements the balance; decline writes the audit row only.
  3. The staff member receives a notification (hr.leave.decided topic).

Cross-cutting rules:

  • Balance overrun on approve is hard-blocked at the server (ErrBalanceOverrun → 422). The UI surfaces a toast.
  • Approving a request not in submitted state returns 422 (ErrInvalidStateTransition).
  • The audit row carries a before/after diff so the admin/audit-logs surface can render the decision history.

Common issues#

  • “I can’t see the admin section for a Phase 2 surface” — confirm the relevant capability (groups.moderate, mentorship.match, marketplace.curate) is granted to your account.
  • “Ran matching but no proposals appeared” — programme must be in matching state; mentors must be approved (not applied); mentees must be applied. The matcher quietly returns zero proposals if any of those preconditions fails — the dashboard surfaces a warning, not an error.
  • “I can’t suspend a group”groups.moderate is gated on the platform admin role. Group-level admins can ban members but cannot suspend the group itself. Contact a platform admin.