Skip to content

Commit 100a8de

Browse files
Irwin-SOLIMANEmmanuelle BONOLIEmmanuelleBonoliSebastienDechandpeacepilou
authored
Development (#105)
* delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 2/docker (#43) * Development (#37) * delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> --------- Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * Feature/issue 2/docker (#44) * Development (#37) * delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * ✨ added the cd yml conf to deploy on VPS --------- Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * Update ci.yml (#46) * ✨ added the cd yml conf to deploy on VPS (#47) * Irwin soliman patch 2 (#49) * Development (#45) * delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 2/docker (#43) * Development (#37) * delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> --------- Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * Feature/issue 2/docker (#44) * Development (#37) * delete old way to handle interactions user * handle unread messages activities for users (#27) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 34/create activity page (#29) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * Feature/issue 45/admin report (#31) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 83/display previous association activity images (#33) * 🚧 WIP * ✨ backend fully operational for adding an new activity to DB * ✨ adress is now complete with lat and lon comming from front * 🔨 back can now provide both image with URL and Blob * ✨ asso can now select from previous activity photo when creating new activity * feat(issue-38): implement association profile (#34) - implement password change - implement account delete - implement add / remove stats - implement update info and description * start tests backend: UT and IT (#35) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Feature/issue 45/admin report (#36) * Hotfix/issue 9998/review staging (#26) * add default Avatar image for association and also a type to identify user and voluntary * 🔨 theme are now sorted by backend * 🔨 add route for activityById and fix cors and fix isIS * create admin report page --------- Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🔨 fix PR comments (#38) --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Irwin SOLIMAN <122315710+Irwin-SOLIMAN@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> * Feature/issue 85/add draft to activity creation (#39) * 🔨 add activity draft is now complete # Conflicts: # src/main/java/com/back_alasso/Activity/Activity.java # src/main/java/com/back_alasso/Activity/ActivityController.java # src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java # src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java # src/main/java/com/back_alasso/Address/Address.java # src/main/java/com/back_alasso/Association/AssociationService.java # src/main/java/com/back_alasso/User/UserService.java * ✨ association : add draft to activity creation � Conflicts: � src/main/java/com/back_alasso/Activity/Activity.java � src/main/java/com/back_alasso/Activity/ActivityController.java � src/main/java/com/back_alasso/Activity/ActivityResponseMapper.java � src/main/java/com/back_alasso/Activity/DTO/ActivityResponseDTO.java � src/main/java/com/back_alasso/Association/AssociationService.java � src/main/java/com/back_alasso/User/UserService.java * 🔨 refacto activity Service and added validator to DTO --------- Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * feat(issue-50): implement profile update, email change, password change, account deletion, and avatar upload (#40) - Implement voluntary profile update endpoint with DTO validation - Allow voluntary users to change their email with token regeneration - Implement password change functionality for all users - Add account deletion endpoint for voluntary users - Implement avatar upload for voluntary users with filename and extension storage - Refactor DTO structure: move to dedicated Authentication/DTO and Voluntary/DTO packages - Add missing ActivityDTO, AssociationCardDTO, and related association DTOs * CI-CD ready for local work (#41) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * ✨ added the cd yml conf to deploy on VPS --------- Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> * Update ci.yml (#46) * ✨ added the cd yml conf to deploy on VPS (#47) --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> * Update cd.yml --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com> * ✨ added the cd yml conf to deploy on VPS (#51) Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> * fix(issue-50): fix location on map * add ban user(asso and voluntary), contact user to admin actions (#54) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * 🐛 fix e2e for stagging (#55) * Hotfix/issue 9999/fix cors for e2e (#57) * 🐛 fix e2e for stagging * rollback * Hotfix/issue 9999/fix cors for e2e (#58) * rollback * 🐛 fix cors * fix again (#60) * fix prod docker (#63) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * authorize swagger documentation routes * feat(issue-92): prevent registration when activity is full or past (#66) * feat(issue-92): prevent registration when activity is full or past * refactor(issue-92): use lombok to clean code * Feature/issue 108/forgotten password (#68) * ✨ user can now reset his password with email token # Conflicts: # src/main/java/com/back_alasso/security/SecurityConstants.java * refacto mailing system to use it for activity register � Conflicts: � src/main/java/com/back_alasso/features/ActivityVoluntary/ActivityVoluntaryService.java * 🐛 fix test * Feature/issue 108/forgotten password (#71) * ✨ user can now reset his password with email token # Conflicts: # src/main/java/com/back_alasso/security/SecurityConstants.java * refacto mailing system to use it for activity register � Conflicts: � src/main/java/com/back_alasso/features/ActivityVoluntary/ActivityVoluntaryService.java * 🐛 fix test * 🐛 fix wrong env variable --------- Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> * feat(issue-104): add upload association cover in profile (#76) * Feature/issue 108/forgotten password (#77) * ✨ user can now reset his password with email token * refacto mailing system to use it for activity register � Conflicts: � src/main/java/com/back_alasso/features/ActivityVoluntary/ActivityVoluntaryService.java * 🐛 fix wrong env variable * 🐛 fix transactional * minimize images, authorize admin to delete activities and start revision of getting activities (#80) Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * Hotfix/issue 666/some changes (#82) * minimize images, authorize admin to delete activities and start revision of getting activities * fix Irwin --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> * hotfix(issue-888): past activities now works * ✨ added ip ban for brut force (#87) * Feature/issue 107/brut force ip ban (#90) * ✨ added ip ban for brut force * 🐛 fix new SSH PORT since fail2ban has been added to VPS --------- Co-authored-by: Irwin <irwin.soliman@gmail.com> * Feature/issue 107/brut force ip ban (#92) * ✨ added ip ban for brut force * 🐛 fix new SSH PORT since fail2ban has been added to VPS --------- Co-authored-by: Irwin <irwin.soliman@gmail.com> * Feature/issue 107/brut force ip ban (#94) * ✨ added ip ban for brut force * 🐛 fix new SSH PORT since fail2ban has been added to VPS --------- Co-authored-by: Irwin <irwin.soliman@gmail.com> * hotfix(issue-777): fix login limit reset when succesfull login (#96) - Fix DBInitializer (delete Irwin) - Resize images * 🐛 removed check for POST routes as it is already protected by token. Note : Previously if 5 POST request were done, u was banned because bucket was not reset (#101) * fix after users review (#104) Co-authored-by: Irwin <irwin.soliman@gmail.com> --------- Co-authored-by: Emmanuelle BONOLI <manu.bonoli@gmail.com> Co-authored-by: Emmanuelle B <128315974+EmmanuelleBonoli@users.noreply.github.com> Co-authored-by: Sébastien DECHAND <125138091+sebastienDOC@users.noreply.github.com> Co-authored-by: sebastienDOC <s.dechand21@gmail.com> Co-authored-by: Pierre-Louis <61482009+peacepilou@users.noreply.github.com>
1 parent fc8e9e9 commit 100a8de

9 files changed

Lines changed: 95 additions & 18 deletions

File tree

pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,25 @@
135135
<artifactId>jjwt-impl</artifactId>
136136
<version>0.11.5</version>
137137
</dependency>
138+
<dependency>
139+
<groupId>net.coobird</groupId>
140+
<artifactId>thumbnailator</artifactId>
141+
<version>0.4.20</version>
142+
</dependency>
143+
<dependency>
144+
<groupId>org.apache.commons</groupId>
145+
<artifactId>commons-lang3</artifactId>
146+
<version>3.14.0</version>
147+
</dependency>
148+
<dependency>
149+
<groupId>com.fasterxml.jackson.core</groupId>
150+
<artifactId>jackson-databind</artifactId>
151+
</dependency>
152+
<dependency>
153+
<groupId>com.fasterxml.jackson.core</groupId>
154+
<artifactId>jackson-databind</artifactId>
155+
<version>2.15.0</version>
156+
</dependency>
138157
<dependency>
139158
<groupId>io.jsonwebtoken</groupId>
140159
<artifactId>jjwt-jackson</artifactId>

src/main/java/com/back_alasso/BackendProjectTemplateApplication.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
package com.back_alasso;
22

33
import com.back_alasso.config.InitLogger;
4+
import com.fasterxml.jackson.core.StreamReadConstraints;
45
import org.springframework.boot.SpringApplication;
56
import org.springframework.boot.autoconfigure.SpringBootApplication;
7+
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
68
import org.springframework.context.ApplicationContext;
79
import org.springframework.context.annotation.Bean;
810
import org.springframework.web.client.RestTemplate;
911

1012
@SpringBootApplication
1113
public class BackendProjectTemplateApplication {
1214

15+
private final int ONE_HUNDRED_THOUSAND = 100_000_000;
16+
1317
public static void main(String[] args) {
18+
System.setProperty("spring.jackson.parser.allow-unquoted-field-names", "true");
1419
ApplicationContext context = SpringApplication.run(BackendProjectTemplateApplication.class, args);
1520
InitLogger logger = new InitLogger();
1621
logger.logCurrentEnvironment(context);
@@ -20,4 +25,12 @@ public static void main(String[] args) {
2025
public RestTemplate restTemplate() {
2126
return new RestTemplate();
2227
}
28+
29+
@Bean
30+
public Jackson2ObjectMapperBuilderCustomizer jacksonCustomizer() {
31+
return builder ->
32+
builder.postConfigurer(mapper ->
33+
mapper.getFactory().setStreamReadConstraints(StreamReadConstraints.builder().maxStringLength(ONE_HUNDRED_THOUSAND).build())
34+
);
35+
}
2336
}

src/main/java/com/back_alasso/features/Activity/DTO/ActivitySaveRequestDTO.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.back_alasso.features.Image.DTO.ImageActivityCreationRequestDTO;
66
import com.back_alasso.features.Theme.ThemeNameEnumType;
77
import jakarta.validation.Valid;
8+
import jakarta.validation.constraints.Min;
89
import jakarta.validation.constraints.NotBlank;
910
import jakarta.validation.constraints.NotEmpty;
1011
import jakarta.validation.constraints.NotNull;
@@ -31,7 +32,8 @@ public class ActivitySaveRequestDTO {
3132
@NotBlank(groups = OnPublish.class)
3233
private String title;
3334

34-
@NotNull(groups = OnPublish.class)
35+
@NotNull(groups = OnPublish.class, message = "Le nombre de volontaires est obligatoire")
36+
@Min(value = 1, message = "Le nombre de volontaires doit être supérieur à 0")
3537
private Long requestedVolunteers;
3638

3739
@NotNull(groups = OnPublish.class)

src/main/java/com/back_alasso/features/Authentication/AuthController.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import jakarta.validation.Validator;
1818
import java.util.HashMap;
1919
import java.util.Map;
20+
import java.util.UUID;
2021
import lombok.RequiredArgsConstructor;
2122
import org.springframework.beans.factory.annotation.Autowired;
2223
import org.springframework.http.HttpStatus;
@@ -39,6 +40,16 @@ public class AuthController {
3940
private final AssociationLoginResponseMapper associationLoginResponseMapper;
4041
private final LoginRateLimitFilter loginRateLimitFilter;
4142

43+
@GetMapping("/token")
44+
public ResponseEntity<Map<String, Object>> getUserByToken(@AuthenticationPrincipal UserDetails userDetails) {
45+
UUID authenticatedUserId = userService.getAuthenticatedUserId(userDetails);
46+
User user = userService.findById(authenticatedUserId);
47+
48+
Map<String, Object> response = new HashMap<>();
49+
authService.addUserToResponse(user, response);
50+
return ResponseEntity.ok(response);
51+
}
52+
4253
@PostMapping("/register/voluntary")
4354
public ResponseEntity<Boolean> register(@Valid @RequestBody VoluntaryRegistrationDTO voluntaryRegistrationDTO) {
4455
userService.checkUserExists(voluntaryRegistrationDTO.email());
@@ -48,7 +59,7 @@ public ResponseEntity<Boolean> register(@Valid @RequestBody VoluntaryRegistratio
4859
}
4960

5061
@PostMapping("/register/association")
51-
public ResponseEntity<Boolean> register(@RequestBody AssociationRegistrationDTO associationRegistrationDTO) {
62+
public ResponseEntity<Boolean> register(@Valid @RequestBody AssociationRegistrationDTO associationRegistrationDTO) {
5263
validator.validate(associationRegistrationDTO, OnPublish.class);
5364

5465
userService.checkUserExists(associationRegistrationDTO.email());

src/main/java/com/back_alasso/features/Authentication/ValidationConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ public class ValidationConstants {
77
public static final int MIN_PASSWORD_LENGTH = 8;
88
public static final String SIRET_REGEX = "^\\d{14}$";
99
public static final String PASSWORD_REGEX = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()_\\-+=\\[\\]{};':\"\\\\|,.<>/?]).{8,}$";
10-
public static final String PHONE_REGEX = "^(\\+33|0)[1-9](\\d{2}){4}$";
10+
public static final String PHONE_REGEX = "^(|(?:\\+33|0)[1-9](\\d{2}){4})$";
1111
}

src/main/java/com/back_alasso/features/Image/ImageService.java

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
import com.back_alasso.exception.ResourceNotFoundException;
44
import com.back_alasso.features.Image.DTO.ImageActivityCreationRequestDTO;
5+
import java.awt.image.BufferedImage;
6+
import java.io.ByteArrayInputStream;
7+
import java.io.ByteArrayOutputStream;
58
import java.io.IOException;
69
import java.util.ArrayList;
710
import java.util.Base64;
811
import java.util.Collections;
912
import java.util.List;
1013
import java.util.UUID;
14+
import javax.imageio.ImageIO;
1115
import lombok.RequiredArgsConstructor;
16+
import net.coobird.thumbnailator.Thumbnails;
1217
import org.apache.commons.lang3.StringUtils;
1318
import org.springframework.stereotype.Service;
1419
import org.springframework.web.multipart.MultipartFile;
@@ -18,6 +23,27 @@
1823
public class ImageService {
1924

2025
private final ImageRepository imageRepository;
26+
private final double ZERO_POINT_SIX = 0.6;
27+
private final double ONE = 1.0;
28+
29+
private byte[] compressImage(byte[] originalBytes, double targetQuality, double scale) throws IOException {
30+
ByteArrayInputStream inputStream = new ByteArrayInputStream(originalBytes);
31+
BufferedImage originalImage = ImageIO.read(inputStream);
32+
33+
if (originalImage == null) {
34+
throw new IOException("Impossible de lire l'image");
35+
}
36+
37+
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
38+
39+
Thumbnails.of(originalImage)
40+
.scale(scale) // ex: 1.0 garde la taille, <1.0 réduit
41+
.outputQuality(targetQuality) // qualité JPEG/WebP (0.0 à 1.0)
42+
.outputFormat("jpeg")
43+
.toOutputStream(outputStream);
44+
45+
return outputStream.toByteArray();
46+
}
2147

2248
public List<Image> processImages(List<ImageActivityCreationRequestDTO> imageDTOs) {
2349
if (imageDTOs == null || imageDTOs.isEmpty()) return Collections.emptyList();
@@ -36,11 +62,17 @@ public List<Image> processImages(List<ImageActivityCreationRequestDTO> imageDTOs
3662
}
3763
byte[] imageData = Base64.getDecoder().decode(base64);
3864

39-
Image image = new Image();
40-
image.setData(imageData);
41-
image.setType(ImageEnumType.ACTIVITY);
42-
image.setUrl("");
43-
newImages.add(image);
65+
try {
66+
byte[] compressed = compressImage(imageData, ZERO_POINT_SIX, ONE);
67+
68+
Image image = new Image();
69+
image.setData(compressed);
70+
image.setType(ImageEnumType.ACTIVITY);
71+
image.setUrl("");
72+
newImages.add(image);
73+
} catch (IOException e) {
74+
throw new RuntimeException("Erreur lors de la compression de l'image", e);
75+
}
4476
}
4577
}
4678

@@ -56,12 +88,16 @@ public Image uploadImage(MultipartFile file, ImageEnumType type, String folder)
5688

5789
validateExtension(extension);
5890

91+
byte[] originalData = file.getBytes();
92+
93+
byte[] compressedData = compressImage(originalData, ZERO_POINT_SIX, ONE);
94+
5995
String cleanedFilename = cleanFilename(originalFilename != null ? originalFilename : type.name().toLowerCase());
6096
String uniqueFilename = UUID.randomUUID() + "_" + cleanedFilename;
6197
String url = "/images/" + folder + "/" + uniqueFilename;
6298

6399
Image image = new Image();
64-
image.setData(file.getBytes());
100+
image.setData(compressedData);
65101
image.setType(type);
66102
image.setFilename(uniqueFilename);
67103
image.setFormat(extension);

src/main/java/com/back_alasso/security/JwtAuthenticationFilter.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ public JwtAuthenticationFilter(JwtService jwtService, UserDetailsService userDet
3333
@Override
3434
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
3535
throws ServletException, IOException {
36-
if (isPublicUrl(request) && parseJwt(request) == null) {
37-
filterChain.doFilter(request, response);
38-
return;
39-
}
40-
41-
if (!authenticateRequest(request, response)) {
36+
if (!isPublicUrl(request) && !authenticateRequest(request, response)) {
4237
return;
4338
}
4439

src/main/java/com/back_alasso/security/SecurityConstants.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ public class SecurityConstants {
66

77
public static final Set<String> PUBLIC_URLS = new HashSet<>(
88
Arrays.asList(
9-
"/auth/**",
9+
"auth/register/**",
10+
"auth/login",
1011
"/reset-password/**",
1112
"/themes",
12-
"/activities",
13+
"/activities/future",
1314
"/activities/{id}",
1415
"/association/{id}",
1516
"/images/**",

src/test/java/com/back_alasso/integration/User/UserServiceIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class UserServiceIntegrationTest extends AbstractTests {
7575
private PreferencesRepository preferencesRepository;
7676

7777
@MockitoBean
78-
private GeolocationService geolocationService; // Mock du service externe
78+
private GeolocationService geolocationService;
7979

8080
@BeforeEach
8181
void setup() {

0 commit comments

Comments
 (0)