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#
| Surface | Admin route | Operational handbook |
|---|---|---|
| Groups + chapters | /admin/groups | Group admin handbook |
| Mentorship programmes | /admin/mentorship, /admin/mentorship/programmes/new, /admin/mentorship/programmes/<id> | Mentorship operations guide |
| Marketplace deals | /admin/marketplace/deals | Marketplace partner-onboarding workflow |
| Marketplace partners | /admin/marketplace/partners | (same) |
| Staff leave queue | /admin/staff/leave-requests | This page (see below) |
| CMS announcements | /admin/cms/announcements | documentation/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 callRunMatchingand 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:
- Open the request — see staff name, leave type, dates, reason, current balance.
- Approve or Decline. Approve writes the audit row and decrements the balance; decline writes the audit row only.
- The staff member receives a notification (
hr.leave.decidedtopic).
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
submittedstate 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
matchingstate; mentors must beapproved(notapplied); mentees must beapplied. 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.moderateis gated on the platform admin role. Group-level admins can ban members but cannot suspend the group itself. Contact a platform admin.