IA-924: feat(admin): Implement photo visibility control for admin and user profiles
Summary
Introduces a photoVisibility field throughout the backend stack, enabling
users to control who can see their profile photo. When set to "private",
the photo is redacted from all responses exposed to other users.
Changes
AdminRequest
- Added
photoVisibilityfield.
AdminResponse
- Added
photoVisibilityfield.
UserResponse
- Added
photoandphotoVisibilityfields.
AdminMapper
-
requestToEntity: mapsphotoVisibilityfrom request to entity. -
entityToResponse: mapsphotoVisibilityfrom entity to response.
UserMapper
-
entityToResponse: now mapsphotoandphotoVisibilityfrom the user entity.
AdminServiceImpl
-
updateAdmin: persistsphotoVisibilityfrom the incoming request onto the admin entity. -
getAdminById: redactsphotofrom the response when visibility is set to"private".
UserServiceImpl
-
getAllUsers: after mapping each Admin, Parent, and Child toUserResponse, nullifiesphotoifphotoVisibilityis"private".