Skip to content

Initial Release#16

Merged
rozicd merged 23 commits intomainfrom
develop
Feb 25, 2026
Merged

Initial Release#16
rozicd merged 23 commits intomainfrom
develop

Conversation

@rozicd
Copy link
Copy Markdown
Contributor

@rozicd rozicd commented Feb 25, 2026

No description provided.

rozicd and others added 23 commits January 14, 2026 19:57
Added logstash-logback-encoder dependency and configured Logback for structured logging to Logstash. Enhanced TestController with MDC and logging statements. Updated application properties for logging settings and added Logback configuration files for main and test environments.
* feat: Add user profile APIs, soft-delete support

Introduce user profile endpoints and related service/DTO/entity changes. Adds UserController (/api/user/me) with GET, PUT and password update endpoints guarded by roles; new request DTOs UpdateUserRequest and ChangePasswordRequest with validation. Introduce BaseEntity (UUID id, createdAt, updatedAt, isDeleted) and update User to extend it; apply SQL restriction to exclude soft-deleted users and update mapper to ignore isDeleted. Add UserService implementing getProfile, updateProfile (checks for username/email conflicts, persists changes and returns refreshed JWT) and changePassword (validates current password). Add UserNotFoundException and register handler in GlobalExceptionHandler. Add Flyway migration V2 to add is_deleted column to users table.

* feat: Add unit tests for UserController and UserService

Introduce comprehensive JUnit tests for user controller and service layers. Adds UserControllerTest (MockMvc tests covering getProfile, updateProfile and changePassword with success and error cases, including exception handling via GlobalExceptionHandler) and UserServiceTest (unit tests for getProfile, updateProfile and changePassword covering success paths, validation, and exceptions like UserAlreadyExistsException, InvalidCredentialsException, and UserNotFoundException). Tests use Mockito to mock dependencies and verify behavior and side effects.

* fix: Modified changePassword to use new InvalidPasswordException that returns 400 instead of 401

* feat: Add user profile APIs, soft-delete support

Introduce user profile endpoints and related service/DTO/entity changes. Adds UserController (/api/user/me) with GET, PUT and password update endpoints guarded by roles; new request DTOs UpdateUserRequest and ChangePasswordRequest with validation. Introduce BaseEntity (UUID id, createdAt, updatedAt, isDeleted) and update User to extend it; apply SQL restriction to exclude soft-deleted users and update mapper to ignore isDeleted. Add UserService implementing getProfile, updateProfile (checks for username/email conflicts, persists changes and returns refreshed JWT) and changePassword (validates current password). Add UserNotFoundException and register handler in GlobalExceptionHandler. Add Flyway migration V2 to add is_deleted column to users table.

* feat: Add unit tests for UserController and UserService

Introduce comprehensive JUnit tests for user controller and service layers. Adds UserControllerTest (MockMvc tests covering getProfile, updateProfile and changePassword with success and error cases, including exception handling via GlobalExceptionHandler) and UserServiceTest (unit tests for getProfile, updateProfile and changePassword covering success paths, validation, and exceptions like UserAlreadyExistsException, InvalidCredentialsException, and UserNotFoundException). Tests use Mockito to mock dependencies and verify behavior and side effects.

* fix: Modified changePassword to use new InvalidPasswordException that returns 400 instead of 401

* fix: Jacoco in pipeline

* fix: Dsonar.sources in pipeline
Introduce UserPublicController with GET /api/user/{id} endpoint that returns a UserResponse via UserService.getProfile(UUID) and is protected by @RequireRole({"HOST","GUEST"}). Add comprehensive unit tests (UserPublicControllerTest) using MockMvc to cover successful access for HOST and GUEST, missing auth headers (401), forbidden role (403), and user-not-found mapping to 404 via GlobalExceptionHandler. Tests configure UserContextResolver and RoleAuthorizationInterceptor to simulate request context and authorization.
@sonarqubecloud
Copy link
Copy Markdown

@rozicd rozicd merged commit 95112c5 into main Feb 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants