Merge pull request 'fixes bug#AL-2074' (#35) from AL-2074 into master
Reviewed-on: http://18.235.188.113:3000/adm/ModelWeb/pulls/35 Reviewed-by: pinheiro <valdevir@rjconsultores.com.br> Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>master
commit
537a952dde
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ModelWeb</artifactId>
|
<artifactId>ModelWeb</artifactId>
|
||||||
<version>1.0.37</version>
|
<version>1.0.38</version>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>rj-releases</id>
|
<id>rj-releases</id>
|
||||||
|
|
|
@ -131,6 +131,11 @@ public class Usuario implements Serializable, UserDetails, Auditavel<Usuario> {
|
||||||
@Column(name = "INDRETORNATODASLOCALIDADES")
|
@Column(name = "INDRETORNATODASLOCALIDADES")
|
||||||
private Boolean indRetornaTodasLocalidades;
|
private Boolean indRetornaTodasLocalidades;
|
||||||
|
|
||||||
|
@Column(name = "INDTROCASENHA")
|
||||||
|
private Boolean indTrocaSenha;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
private Usuario usuarioClone;
|
private Usuario usuarioClone;
|
||||||
|
@ -507,6 +512,14 @@ public class Usuario implements Serializable, UserDetails, Auditavel<Usuario> {
|
||||||
public void setIndRetornaTodasLocalidades(Boolean indRetornaTodasLocalidades) {
|
public void setIndRetornaTodasLocalidades(Boolean indRetornaTodasLocalidades) {
|
||||||
this.indRetornaTodasLocalidades = indRetornaTodasLocalidades;
|
this.indRetornaTodasLocalidades = indRetornaTodasLocalidades;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndTrocaSenha() {
|
||||||
|
return indTrocaSenha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndTrocaSenha(Boolean indTrocaSenha) {
|
||||||
|
this.indTrocaSenha = indTrocaSenha;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -539,6 +552,8 @@ public class Usuario implements Serializable, UserDetails, Auditavel<Usuario> {
|
||||||
public String getTextoInclusaoExclusao() {
|
public String getTextoInclusaoExclusao() {
|
||||||
return String.format("ID [%s]", getUsuarioId());
|
return String.format("ID [%s]", getUsuarioId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,6 +180,7 @@ public class UsuarioServiceImpl implements UsuarioService, UserDetailsService {
|
||||||
entidad.setFecContrasena(Calendar.getInstance().getTime());
|
entidad.setFecContrasena(Calendar.getInstance().getTime());
|
||||||
entidad.setUsuariomodifId(entidad.getUsuarioId());
|
entidad.setUsuariomodifId(entidad.getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setIndTrocaSenha(Boolean.FALSE);
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
if (entidad.getUsuarioId() != null) {
|
if (entidad.getUsuarioId() != null) {
|
||||||
|
@ -231,6 +232,12 @@ public class UsuarioServiceImpl implements UsuarioService, UserDetailsService {
|
||||||
throw new CredentialsExpiredException("Senha Expirada");
|
throw new CredentialsExpiredException("Senha Expirada");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user.getIndTrocaSenha() != null) {
|
||||||
|
if (user.getIndTrocaSenha()) {
|
||||||
|
throw new CredentialsExpiredException("Senha Expirada");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue