Skip to content

feat: Admin APIs to exclude mentee from cycle, mark not eligible, and ban mentee #547

@womencodingcommunity

Description

@womencodingcommunity

Context

Admins need the ability to take severe actions against mentees at the cycle or profile level:

  1. Exclude from cycle — mentee has conduct or fit issues within the current cycle. All open applications are terminated. No forwarding. The mentee profile is unaffected.
  2. Not eligible — mentee's community membership is not approved. All open applications terminated. Different from exclusion in that it reflects a membership status issue.
  3. Ban mentee — most severe action. All open applications terminated AND ProfileStatus set to BANNED, blocking all future mentorship registrations.

Changes Required

MenteeWorkflowService

  • Add excludeFromCycle(menteeId, cycleId, reason):
    • Sets CYCLE_EXCLUDED on all open applications for that mentee+cycle
    • No forwarding
  • Add markNotEligible(menteeId, cycleId, reason):
    • Sets NOT_ELIGIBLE on all open applications for that mentee+cycle
    • No forwarding
  • Add banMentee(menteeId, reason):
    • Calls excludeFromCycle() for all active cycles
    • Sets ProfileStatus.BANNED on the mentee profile

New API endpoints

POST /api/platform/v1/mentees/{menteeId}/cycles/{cycleId}/exclude
Body: { "reason": "string" }

POST /api/platform/v1/mentees/{menteeId}/cycles/{cycleId}/not-eligible
Body: { "reason": "string" }

POST /api/platform/v1/mentees/{menteeId}/ban
Body: { "reason": "string" }

Acceptance Criteria

  • excludeFromCycle() closes all open applications with CYCLE_EXCLUDED
  • markNotEligible() closes all open applications with NOT_ELIGIBLE
  • banMentee() closes all open applications and sets ProfileStatus.BANNED
  • Ban blocks future registration (depends on Ticket 2)
  • All three endpoints require admin permission and are documented in OpenAPI/Swagger
  • Unit and integration tests for each action

Dependencies

  • Ticket: feat: Add new ApplicationStatus values and DB migration
  • Ticket: feat: Block mentorship registration for ineligible mentees

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestepic-mentorshipAll tasks related to mentorship pages & tasksjava/springbootTasks where is needed Java experience or Spring Boot Experience

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions