changes.
This commit is contained in:
parent
57bc6ae303
commit
e2fc463dd5
@ -101,7 +101,13 @@ public class ParticipantService {
|
|||||||
|
|
||||||
|
|
||||||
Participant saved = participantRepository.save(participant);
|
Participant saved = participantRepository.save(participant);
|
||||||
log.info("Participant saved: {}", saved.getFullName());
|
|
||||||
|
boolean credentialsChanged = persistUserData(participantSaveDTO, saved, editMode, participant);
|
||||||
|
|
||||||
|
if (credentialsChanged) {
|
||||||
|
log.info("User {} changed credentials, logging out", saved.getUser().getUsername());
|
||||||
|
authenticationService.logout(saved.getUser().getUsername());
|
||||||
|
}
|
||||||
|
|
||||||
if (!editMode && participantSaveDTO.getUserData() != null) {
|
if (!editMode && participantSaveDTO.getUserData() != null) {
|
||||||
emailService.sendEmail(saved.getEmail(), "Вам была создана учетная запись в системе поддержки ВКР", """
|
emailService.sendEmail(saved.getEmail(), "Вам была создана учетная запись в системе поддержки ВКР", """
|
||||||
@ -131,13 +137,7 @@ public class ParticipantService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.info("Participant saved: {}", saved.getFullName());
|
||||||
boolean credentialsChanged = persistUserData(participantSaveDTO, saved, editMode, participant);
|
|
||||||
|
|
||||||
if (credentialsChanged) {
|
|
||||||
log.info("User {} changed credentials, logging out", saved.getUser().getUsername());
|
|
||||||
authenticationService.logout(saved.getUser().getUsername());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Role> persistRoles(ParticipantSaveDTO participantSaveDTO, Participant existingParticipant, boolean editMode, User callerUser, Participant participant) {
|
private List<Role> persistRoles(ParticipantSaveDTO participantSaveDTO, Participant existingParticipant, boolean editMode, User callerUser, Participant participant) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user