Skip to content

Commit

Permalink
EPMRPP-95299 update last login time
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Nov 19, 2024
1 parent 813ba8b commit 4c61b46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
api 'com.epam.reportportal:commons-dao'
api 'com.epam.reportportal:commons'
} else {
api 'com.github.reportportal:commons-dao:develop-SNAPSHOT'
api 'com.github.reportportal:commons-dao:c6784ce'
api 'com.github.reportportal:commons:develop-SNAPSHOT'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.epam.ta.reportportal.entity.project.Project;
import com.epam.ta.reportportal.entity.user.User;
import com.epam.ta.reportportal.util.PersonalProjectService;
import java.time.Instant;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
Expand Down Expand Up @@ -61,9 +60,7 @@ public void onApplicationEvent(UiUserSignedInEvent event) {
SecurityContextHolder.clearContext();
throw new LockedException("User account is locked");
}
userRepository.updateLastLoginDate(
Instant.ofEpochMilli(event.getTimestamp()),
username);
userRepository.updateLastLoginDate(username);

if (MapUtils.isEmpty(acquireUser(event.getAuthentication()).getProjectDetails())) {
User user = userRepository.findByLogin(username)
Expand Down

0 comments on commit 4c61b46

Please sign in to comment.