Skip to content

Commit 828b3c4

Browse files
refactor(user): narrow ActiveUserService transaction scope
1 parent 29ba26a commit 828b3c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/hbp/mip/user/ActiveUserService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import java.util.Objects;
1313

1414
@Service
15-
@Transactional
1615
public class ActiveUserService {
1716

1817
private final UserRepository userRepository;
@@ -30,6 +29,7 @@ public ActiveUserService(UserRepository userRepository) {
3029
*
3130
* @return the userDAO
3231
*/
32+
@Transactional
3333
public UserDTO getActiveUser(Authentication authentication) {
3434
UserDAO activeUserDAO;
3535
if (authenticationIsEnabled) {
@@ -72,6 +72,7 @@ public UserDTO getActiveUser(Authentication authentication) {
7272
return new UserDTO(activeUserDAO);
7373
}
7474

75+
@Transactional
7576
public UserDTO agreeToNDA(Authentication authentication) {
7677
UserDTO userDTO = getActiveUser(authentication);
7778

0 commit comments

Comments
 (0)