-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Block mentorship registration for ineligible mentees based on ProfileStatus #544
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
A mentee should not be allowed to register for a mentorship cycle if their community membership has not been approved. Currently there is no guard against this. The ProfileStatus enum already has PENDING, REJECTED, BANNED, and DISABLED values that should be used to block registration.
Changes Required
MenteeService.saveRegistration()
- Before any processing, check the mentee's
ProfileStatus - Throw a descriptive exception for each blocking status:
PENDING→ membership not yet approvedREJECTED→ membership application rejectedBANNED→ permanently banned from the communityDISABLED→ account temporarily disabled
- Only
ACTIVEmembers can register
New exception
- Create
MenteeNotEligibleException(or reuse existing pattern) with a clear message indicating why registration is blocked
Acceptance Criteria
- Registration blocked for
PENDING,REJECTED,BANNED,DISABLEDprofile statuses - Clear exception message returned per blocking status
-
ACTIVEmembers can register normally (existing tests pass) - Unit tests added for each blocked status scenario
- Integration test added
Dependencies
- Ticket: feat: Add new ApplicationStatus values and DB migration
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