Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Conversation

@gustaavik
Copy link
Member

This pull request includes several changes to the AuthenticationController, UserManagementController, AuthenticationService, and UserManagementService to improve user management and authentication processes. The most notable changes are the addition of a new endpoint for registering guests, the refactoring of guest conversion logic, and the removal of redundant code.

Authentication and Authorization Enhancements:

  • Added @PreAuthorize annotation to AuthenticationController to ensure that only users with the appropriate roles can access the new registerGuest endpoint. [1] [2]
  • Introduced a new registerGuest method in AuthenticationController to convert guest users to registered users.

Code Refactoring:

  • Moved the registerGuest logic from UserManagementController to AuthenticationController and removed the corresponding method from UserManagementController.
  • Refactored AuthenticationService to include a new method convertGuestToUser for handling guest conversion logic.

Code Cleanup:

  • Removed unused imports and redundant code from UserManagementService. [1] [2] [3] [4]
  • Removed debug System.out.println statements from OrderService.

@gustaavik gustaavik merged commit 3cfd73b into main Jan 2, 2025
1 check passed
@gustaavik gustaavik deleted the patch-refactoring-registering-guest branch January 2, 2025 20:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants