fixes bug#0011700
dev: gleimar qua: jose Implementação efetuada. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@85073 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
aea7461c43
commit
e16d3e4ae5
|
@ -31,6 +31,7 @@ import org.zkoss.zul.Tab;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
import org.zkoss.zul.Label;
|
import org.zkoss.zul.Label;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empleado;
|
import com.rjconsultores.ventaboletos.entidad.Empleado;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
@ -44,6 +45,7 @@ import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpleadoService;
|
import com.rjconsultores.ventaboletos.service.EmpleadoService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.PerfilFuncionService;
|
||||||
import com.rjconsultores.ventaboletos.service.PerfilService;
|
import com.rjconsultores.ventaboletos.service.PerfilService;
|
||||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||||
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
|
import com.rjconsultores.ventaboletos.service.UsuarioEmpresaService;
|
||||||
|
@ -89,6 +91,8 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
private PuntoVentaService puntoVentaService;
|
private PuntoVentaService puntoVentaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UsuarioSesionService usuarioSesionService;
|
private UsuarioSesionService usuarioSesionService;
|
||||||
|
@Autowired
|
||||||
|
private PerfilFuncionService perfilFuncionService;
|
||||||
private List<Perfil> lsPerfil;
|
private List<Perfil> lsPerfil;
|
||||||
private List<Empresa> lsEmpresa;
|
private List<Empresa> lsEmpresa;
|
||||||
private List<PuntoVenta> lsPuntoVenta = null;
|
private List<PuntoVenta> lsPuntoVenta = null;
|
||||||
|
@ -110,6 +114,8 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
private Textbox txtCveUsuario;
|
private Textbox txtCveUsuario;
|
||||||
private Textbox txtNombPaterno;
|
private Textbox txtNombPaterno;
|
||||||
private Textbox txtNombMaterno;
|
private Textbox txtNombMaterno;
|
||||||
|
private Textbox descCorreo;
|
||||||
|
private Textbox txtTempoDevolucao;
|
||||||
private Button btnAdicionarUbicacion;
|
private Button btnAdicionarUbicacion;
|
||||||
private Button btnRemoverUbicacion;
|
private Button btnRemoverUbicacion;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
|
@ -122,6 +128,7 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
private Button btnAdicionarEmpresa;
|
private Button btnAdicionarEmpresa;
|
||||||
private Label lblDescMac;
|
private Label lblDescMac;
|
||||||
private Radio radioSim;
|
private Radio radioSim;
|
||||||
|
private Radio radioNao;
|
||||||
private Textbox txtDescMac;
|
private Textbox txtDescMac;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -217,9 +224,31 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
desabilitarAdmin();
|
desabilitarAdmin();
|
||||||
|
if (!possuiPermissaoUsuario()) {
|
||||||
|
habilitarApenasUsuarioSenha();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void habilitarApenasUsuarioSenha() {
|
||||||
|
txtCveEmpleado.setDisabled(true);
|
||||||
|
btnPesquisa.setDisabled(true);
|
||||||
|
txtCveUsuario.setDisabled(true);
|
||||||
|
txtNombUsuario.setDisabled(true);
|
||||||
|
txtNombPaterno.setDisabled(true);
|
||||||
|
txtNombMaterno.setDisabled(true);
|
||||||
|
descCorreo.setDisabled(true);
|
||||||
|
txtTempoDevolucao.setDisabled(true);
|
||||||
|
cmbEmpresa.setDisabled(true);
|
||||||
|
radioNao.setDisabled(true);
|
||||||
|
radioSim.setDisabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean possuiPermissaoUsuario() {
|
||||||
|
return perfilFuncionService.usuarioPossuiPermissaoFuncionalidade(
|
||||||
|
usuario.getUsuarioId(), ConstantesFuncionSistema.CLAVE_EDITAR_USUARIO);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean validaHabilitarViradaCaixaAutomatico() {
|
public boolean validaHabilitarViradaCaixaAutomatico() {
|
||||||
List<String> listClavesPermisos = new ArrayList<String>();
|
List<String> listClavesPermisos = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.web.utilerias.menu.item.seguridad;
|
||||||
|
|
||||||
import org.zkoss.util.resource.Labels;
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ public class ItemMenuUsuario extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getClaveMenu() {
|
public String getClaveMenu() {
|
||||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.SEGURIDAD.MENU.USUARIO";
|
return ConstantesFuncionSistema.CLAVE_EDITAR_USUARIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue