Skip to content

IA-924: feat(admin): Implement photo visibility control for admin and user profiles

khadija.elbachouri a demandé de fusionner feature/IA-924 vers develop

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 photoVisibility field.

AdminResponse

  • Added photoVisibility field.

UserResponse

  • Added photo and photoVisibility fields.

AdminMapper

  • requestToEntity: maps photoVisibility from request to entity.
  • entityToResponse: maps photoVisibility from entity to response.

UserMapper

  • entityToResponse: now maps photo and photoVisibility from the user entity.

AdminServiceImpl

  • updateAdmin: persists photoVisibility from the incoming request onto the admin entity.
  • getAdminById: redacts photo from the response when visibility is set to "private".

UserServiceImpl

  • getAllUsers: after mapping each Admin, Parent, and Child to UserResponse, nullifies photo if photoVisibility is "private".

Rapports de requête de fusion