Add Admin UI & backend changes for Self Serving Mentor Profile Update - #770
Open
Sowmiya07 wants to merge 1 commit into
Open
Add Admin UI & backend changes for Self Serving Mentor Profile Update#770Sowmiya07 wants to merge 1 commit into
Sowmiya07 wants to merge 1 commit into
Conversation
Sowmiya07
requested review from
Tooonia,
dricazenck,
goelsonali,
lauracabtay,
nora-weisser and
nverbic
August 17, 2026 19:20
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR Summary
Title:
feat: Mentor self-profile edit page and GET mentor by ID endpointSummary
/admin/mentor/profileGET /api/platform/v1/mentors/{mentorId}withMENTOR_PROFILE_UPDATEpermission so mentors can fetch their own profilegetMentorByIdservice method inMentorshipServicegetMentorByIdservice call to use the direct endpoint instead of fetching all mentors and filtering client-sideBackend Changes
MentorControllerGET /mentors/{mentorId}: replaced@RequiresRole({ADMIN, LEADER, MENTORSHIP_ADMIN})with@RequiresPermission(MENTOR_PROFILE_UPDATE), granting access toADMIN,MENTORSHIP_ADMIN, andMENTORrolesMentorshipServicegetMentorById(Long mentorId): finds mentor by ID, throwsMemberNotFoundExceptionif absent, enriches with profile picture, returnsMentorDtoFrontend Changes
admin-wcc-app/pages/admin/mentor/profile.tsx(new)MENTORrolemember.idfrom the auth context and passes it toEditMentorFormadmin-wcc-app/components/AdminLayout.tsxisMentor(notisAdmin || isMentor)admin-wcc-app/services/mentorService.tsgetMentorByIdnow callsGET /api/platform/v1/mentors/{id}directly instead of fetching the full mentor list and filtering client-side — necessary becauseMENTORrole users do not have access to the list endpoint