-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Admin APIs to exclude mentee from cycle, mark not eligible, and ban mentee #547
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestepic-mentorshipAll tasks related to mentorship pages & tasksAll tasks related to mentorship pages & tasksjava/springbootTasks where is needed Java experience or Spring Boot ExperienceTasks where is needed Java experience or Spring Boot Experience
Milestone
Description
Context
Admins need the ability to take severe actions against mentees at the cycle or profile level:
- 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.
- Not eligible — mentee's community membership is not approved. All open applications terminated. Different from exclusion in that it reflects a membership status issue.
- Ban mentee — most severe action. All open applications terminated AND
ProfileStatusset toBANNED, blocking all future mentorship registrations.
Changes Required
MenteeWorkflowService
- Add
excludeFromCycle(menteeId, cycleId, reason):- Sets
CYCLE_EXCLUDEDon all open applications for that mentee+cycle - No forwarding
- Sets
- Add
markNotEligible(menteeId, cycleId, reason):- Sets
NOT_ELIGIBLEon all open applications for that mentee+cycle - No forwarding
- Sets
- Add
banMentee(menteeId, reason):- Calls
excludeFromCycle()for all active cycles - Sets
ProfileStatus.BANNEDon the mentee profile
- Calls
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 withCYCLE_EXCLUDED -
markNotEligible()closes all open applications withNOT_ELIGIBLE -
banMentee()closes all open applications and setsProfileStatus.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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestepic-mentorshipAll tasks related to mentorship pages & tasksAll tasks related to mentorship pages & tasksjava/springbootTasks where is needed Java experience or Spring Boot ExperienceTasks where is needed Java experience or Spring Boot Experience