Class UserManagementService
java.lang.Object
io.github.navjotsrakhra.eventmanager.service.UserManagementService
The UserManagementService class provides methods for managing user-related operations.
-
Constructor Summary
ConstructorsConstructorDescriptionUserManagementService(UserRepository userRepository) Constructor for the UserManagementService class. -
Method Summary
Modifier and TypeMethodDescriptionGet a list of all users.org.springframework.http.ResponseEntity<Boolean> updateUserRoles(Long id, List<Role> updatedRoles) Update the roles of a user with the specified ID.
-
Constructor Details
-
Method Details
-
getAllUsers
Get a list of all users.- Returns:
- ResponseEntity containing a list of UserDTO objects representing users.
-
updateUserRoles
public org.springframework.http.ResponseEntity<Boolean> updateUserRoles(Long id, List<Role> updatedRoles) Update the roles of a user with the specified ID.- Parameters:
id- The ID of the user to be updated.updatedRoles- The updated list of roles for the user.- Returns:
- ResponseEntity indicating the result of the operation.
-