Criação de novo utilizador não persiste flags : modo de autenticação
(closes #10)
This commit is contained in:
parent
213aac98e7
commit
e7b53493ac
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,8 @@ public class UserService {
|
||||||
user.setResetKey(RandomUtil.generateResetKey());
|
user.setResetKey(RandomUtil.generateResetKey());
|
||||||
user.setResetDate(Instant.now());
|
user.setResetDate(Instant.now());
|
||||||
user.setActivated(true);
|
user.setActivated(true);
|
||||||
|
user.setAllowSamlAuthentication(userDTO.isAllowSamlAuthentication());
|
||||||
|
user.setAllowUserPwdAuthentication(userDTO.isAllowUserPwdAuthentication());
|
||||||
if (userDTO.getAuthorities() != null) {
|
if (userDTO.getAuthorities() != null) {
|
||||||
Set<Authority> authorities = userDTO.getAuthorities().stream().map(authorityRepository::findById).filter(
|
Set<Authority> authorities = userDTO.getAuthorities().stream().map(authorityRepository::findById).filter(
|
||||||
Optional::isPresent).map(Optional::get).collect(Collectors.toSet());
|
Optional::isPresent).map(Optional::get).collect(Collectors.toSet());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue