Commit 24f39a2798f6b51c63c775c35205dadd1e53fb2d
1 parent
cd4c4480
Exists in
master
and in
3 other branches
Adequação para proteção de intimação eletrômnica do módulo de peticionamento.
Showing
4 changed files
with
78 additions
and
22 deletions
Show diff stats
sei/web/modulos/pesquisa/MdPesqBuscaProtocoloExterno.php
| @@ -38,7 +38,6 @@ class MdPesqBuscaProtocoloExterno { | @@ -38,7 +38,6 @@ class MdPesqBuscaProtocoloExterno { | ||
| 38 | public static function executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, $numMaxResultados, $strParticipanteSolr, $md5Captcha = null) { | 38 | public static function executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, $numMaxResultados, $strParticipanteSolr, $md5Captcha = null) { |
| 39 | 39 | ||
| 40 | //carrega configurações pesquisa | 40 | //carrega configurações pesquisa |
| 41 | - | ||
| 42 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | 41 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); |
| 43 | $objParametroPesquisaDTO->retStrNome(); | 42 | $objParametroPesquisaDTO->retStrNome(); |
| 44 | $objParametroPesquisaDTO->retStrValor(); | 43 | $objParametroPesquisaDTO->retStrValor(); |
| @@ -56,9 +55,11 @@ class MdPesqBuscaProtocoloExterno { | @@ -56,9 +55,11 @@ class MdPesqBuscaProtocoloExterno { | ||
| 56 | 55 | ||
| 57 | $parametros = new stdClass(); | 56 | $parametros = new stdClass(); |
| 58 | $filtro = new stdClass(); | 57 | $filtro = new stdClass(); |
| 59 | - | ||
| 60 | $partialfields = ''; | 58 | $partialfields = ''; |
| 61 | 59 | ||
| 60 | + // Parametros peticionamento elerônico | ||
| 61 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | ||
| 62 | + | ||
| 62 | //die($_REQUEST["partialfields"]); | 63 | //die($_REQUEST["partialfields"]); |
| 63 | 64 | ||
| 64 | if(!$bolAutocompletarInterressado){ | 65 | if(!$bolAutocompletarInterressado){ |
| @@ -423,14 +424,23 @@ class MdPesqBuscaProtocoloExterno { | @@ -423,14 +424,23 @@ class MdPesqBuscaProtocoloExterno { | ||
| 423 | die; | 424 | die; |
| 424 | } | 425 | } |
| 425 | 426 | ||
| 426 | - $titulo .= " "; | ||
| 427 | - $parametrosCriptografadosDocumentos = MdPesqCriptografia::criptografa('acao_externa=md_pesq_documento_exibir&id_orgao_acesso_externo=0&id_documento='.$objDocumentoDTO->getDblIdDocumento()); | ||
| 428 | - $endereco = 'md_pesq_documento_consulta_externa.php?'.$parametrosCriptografadosDocumentos; | ||
| 429 | - $titulo .= "(<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\""; | ||
| 430 | - $titulo .= " class=\"protocoloNormal\""; | ||
| 431 | - $titulo .= ">" . $dados["identificacao_protocolo"] . "</a>)"; | ||
| 432 | - | ||
| 433 | - //$tituloProtocolo = "<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\" class=\"protocoloNormal\" >".$dados["protocolo_documento_formatado"]. "</a>"; | 427 | + // Protege Intimação eletônica |
| 428 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | ||
| 429 | + if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objProtocoloDTO->getDblIdProtocolo())) == false){ | ||
| 430 | + $titulo .= " "; | ||
| 431 | + $titulo .= $dados["identificacao_protocolo"]; | ||
| 432 | + $snippet = 'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida'; | ||
| 433 | + | ||
| 434 | + | ||
| 435 | + }else{ | ||
| 436 | + $titulo .= " "; | ||
| 437 | + $parametrosCriptografadosDocumentos = MdPesqCriptografia::criptografa('acao_externa=md_pesq_documento_exibir&id_orgao_acesso_externo=0&id_documento='.$objDocumentoDTO->getDblIdDocumento()); | ||
| 438 | + $endereco = 'md_pesq_documento_consulta_externa.php?'.$parametrosCriptografadosDocumentos; | ||
| 439 | + $titulo .= "(<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\""; | ||
| 440 | + $titulo .= " class=\"protocoloNormal\""; | ||
| 441 | + $titulo .= ">" . $dados["identificacao_protocolo"] . "</a>)"; | ||
| 442 | + } | ||
| 443 | + | ||
| 434 | 444 | ||
| 435 | } | 445 | } |
| 436 | 446 | ||
| @@ -490,6 +500,10 @@ class MdPesqBuscaProtocoloExterno { | @@ -490,6 +500,10 @@ class MdPesqBuscaProtocoloExterno { | ||
| 490 | 500 | ||
| 491 | } | 501 | } |
| 492 | 502 | ||
| 503 | + | ||
| 504 | + | ||
| 505 | + | ||
| 506 | + | ||
| 493 | // Protege contra a não idexação no solr quando o processo passa de público para restrito. | 507 | // Protege contra a não idexação no solr quando o processo passa de público para restrito. |
| 494 | if(($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO && !$bolPesquisaProcessoRestrito) || ($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() == ProtocoloRN::$NA_SIGILOSO)){ | 508 | if(($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO && !$bolPesquisaProcessoRestrito) || ($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() == ProtocoloRN::$NA_SIGILOSO)){ |
| 495 | 509 |
sei/web/modulos/pesquisa/md_pesq_documento_consulta_externa.php
| @@ -21,13 +21,11 @@ try { | @@ -21,13 +21,11 @@ try { | ||
| 21 | //InfraDebug::getInstance()->setBolDebugInfra(false); | 21 | //InfraDebug::getInstance()->setBolDebugInfra(false); |
| 22 | //InfraDebug::getInstance()->limpar(); | 22 | //InfraDebug::getInstance()->limpar(); |
| 23 | ////////////////////////////////////////////////////////////////////////////// | 23 | ////////////////////////////////////////////////////////////////////////////// |
| 24 | - MdPesqConverteURI::converterURI(); | ||
| 25 | - MdPesqPesquisaUtil::valiadarLink(); | ||
| 26 | -// if (isset($_GET['id_acesso_externo'])){ | ||
| 27 | -// SessaoSEIExterna::getInstance($_GET['id_acesso_externo'])->validarLink(); | ||
| 28 | -// }else{ | ||
| 29 | -// // SessaoSEIExterna::getInstance()->validarLink(); | ||
| 30 | -// } | 24 | + |
| 25 | + | ||
| 26 | + MdPesqConverteURI::converterURI(); | ||
| 27 | + MdPesqPesquisaUtil::valiadarLink(); | ||
| 28 | + | ||
| 31 | 29 | ||
| 32 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); | 30 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); |
| 33 | $objParametroPesquisaDTO->retStrNome(); | 31 | $objParametroPesquisaDTO->retStrNome(); |
| @@ -41,6 +39,9 @@ try { | @@ -41,6 +39,9 @@ try { | ||
| 41 | $bolListaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; | 39 | $bolListaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; |
| 42 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; | 40 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; |
| 43 | 41 | ||
| 42 | + // Parametros peticionamento elerônico | ||
| 43 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | ||
| 44 | + | ||
| 44 | $objDocumentoDTO = new DocumentoDTO(); | 45 | $objDocumentoDTO = new DocumentoDTO(); |
| 45 | $objDocumentoDTO->retDblIdDocumento(); | 46 | $objDocumentoDTO->retDblIdDocumento(); |
| 46 | $objDocumentoDTO->retDblIdProcedimento(); | 47 | $objDocumentoDTO->retDblIdProcedimento(); |
| @@ -104,6 +105,13 @@ try { | @@ -104,6 +105,13 @@ try { | ||
| 104 | } | 105 | } |
| 105 | } | 106 | } |
| 106 | 107 | ||
| 108 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | ||
| 109 | + if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objDocumentoDTO->getDblIdDocumento())) == false){ | ||
| 110 | + | ||
| 111 | + die("Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida"); | ||
| 112 | + | ||
| 113 | + } | ||
| 114 | + | ||
| 107 | // Exibe apenas documentos de processos públicos. | 115 | // Exibe apenas documentos de processos públicos. |
| 108 | 116 | ||
| 109 | 117 |
sei/web/modulos/pesquisa/md_pesq_processo_exibir.php
| @@ -35,8 +35,11 @@ try { | @@ -35,8 +35,11 @@ try { | ||
| 35 | 35 | ||
| 36 | $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | 36 | $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); |
| 37 | $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); | 37 | $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); |
| 38 | - | ||
| 39 | $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); | 38 | $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); |
| 39 | + | ||
| 40 | + // Parametros peticionamento elerônico | ||
| 41 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | ||
| 42 | + | ||
| 40 | 43 | ||
| 41 | $bolPesquisaProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S' ? true : false; | 44 | $bolPesquisaProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S' ? true : false; |
| 42 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; | 45 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; |
| @@ -319,11 +322,18 @@ try { | @@ -319,11 +322,18 @@ try { | ||
| 319 | $urlCripografadaDocumeto = MdPesqCriptografia::criptografa('acao_externa=documento_exibir&id_documento='.$objDocumentoDTO->getDblIdDocumento().'&id_orgao_acesso_externo=0'); | 322 | $urlCripografadaDocumeto = MdPesqCriptografia::criptografa('acao_externa=documento_exibir&id_documento='.$objDocumentoDTO->getDblIdDocumento().'&id_orgao_acesso_externo=0'); |
| 320 | $strLinkDocumento = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('md_pesq_documento_consulta_externa.php?'.$urlCripografadaDocumeto)); | 323 | $strLinkDocumento = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('md_pesq_documento_consulta_externa.php?'.$urlCripografadaDocumeto)); |
| 321 | 324 | ||
| 325 | + //Protege acesso à documento público de intimação eletrônica | ||
| 326 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | ||
| 327 | + $bolValidaIntimacaoEletronica = false; | ||
| 328 | + if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objDocumentoDTO->getDblIdDocumento())) == false){ | ||
| 329 | + $bolValidaIntimacaoEletronica = true; | ||
| 330 | + } | ||
| 331 | + | ||
| 322 | $strResultado .= '<tr class="infraTrClara">'; | 332 | $strResultado .= '<tr class="infraTrClara">'; |
| 323 | 333 | ||
| 324 | //Cria checkbox para gerar PDF, verifica se o Processo é público e o Acesso Local do Protocolo é Público | 334 | //Cria checkbox para gerar PDF, verifica se o Processo é público e o Acesso Local do Protocolo é Público |
| 325 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO){ | 335 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO){ |
| 326 | - if($objDocumentoRN->verificarSelecaoGeracaoPdf($objDocumentoDTO)){ | 336 | + if($objDocumentoRN->verificarSelecaoGeracaoPdf($objDocumentoDTO) && !$bolValidaIntimacaoEletronica){ |
| 327 | $strResultado .= '<td align="center">'.PaginaSEIExterna::getInstance()->getTrCheck($numDocumentosPdf++, $objDocumentoDTO->getDblIdDocumento(), $objDocumentoDTO->getStrNomeSerie()).'</td>'; | 337 | $strResultado .= '<td align="center">'.PaginaSEIExterna::getInstance()->getTrCheck($numDocumentosPdf++, $objDocumentoDTO->getDblIdDocumento(), $objDocumentoDTO->getStrNomeSerie()).'</td>'; |
| 328 | }else{ | 338 | }else{ |
| 329 | $strResultado .= '<td> </td>'; | 339 | $strResultado .= '<td> </td>'; |
| @@ -335,7 +345,16 @@ try { | @@ -335,7 +345,16 @@ try { | ||
| 335 | 345 | ||
| 336 | //Exibe link de documentos com nivel de acesso local Público de processo público | 346 | //Exibe link de documentos com nivel de acesso local Público de processo público |
| 337 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ | 347 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ |
| 338 | - $strResultado .= '<td align="center" style="padding-right:22px"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkDocumento.'\');" alt="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" title="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" class="ancoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</a></td>'; | 348 | + |
| 349 | + if($bolValidaIntimacaoEletronica){ | ||
| 350 | + $strResultado .= '<td align="center"><span class="retiraAncoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</span>'; | ||
| 351 | + $strResultado .= '<img src="/infra_css/imagens/espaco.gif">'; | ||
| 352 | + $strResultado .= '<img src="../peticionamento/imagens/intimacao_nao_cumprida_doc_anexo.png" align="absbottom" title="Acesso Restrito.
'.'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida">'; | ||
| 353 | + }else{ | ||
| 354 | + $strResultado .= '<td align="center" style="padding-right:22px"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkDocumento.'\');" alt="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" title="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" class="ancoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</a></td>'; | ||
| 355 | + } | ||
| 356 | + | ||
| 357 | + | ||
| 339 | }else{ | 358 | }else{ |
| 340 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | 359 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ |
| 341 | 360 |
sei/web/modulos/pesquisa/rn/MdPesqParametroPesquisaRN.php
| @@ -37,7 +37,7 @@ class MdPesqParametroPesquisaRN extends InfraRN { | @@ -37,7 +37,7 @@ class MdPesqParametroPesquisaRN extends InfraRN { | ||
| 37 | try { | 37 | try { |
| 38 | 38 | ||
| 39 | //Valida Permissao | 39 | //Valida Permissao |
| 40 | - SessaoSEI::getInstance()->validarAuditarPermissao('md_pesq_parametro_consultar',__METHOD__,$objParametroPesquisaDTO); | 40 | + SessaoSEI::getInstance()->validarPermissao('md_pesq_parametro_consultar',__METHOD__,$objParametroPesquisaDTO); |
| 41 | 41 | ||
| 42 | //Regras de Negocio | 42 | //Regras de Negocio |
| 43 | //$objInfraException = new InfraException(); | 43 | //$objInfraException = new InfraException(); |
| @@ -104,7 +104,7 @@ class MdPesqParametroPesquisaRN extends InfraRN { | @@ -104,7 +104,7 @@ class MdPesqParametroPesquisaRN extends InfraRN { | ||
| 104 | try { | 104 | try { |
| 105 | 105 | ||
| 106 | //Valida Permissao | 106 | //Valida Permissao |
| 107 | - SessaoSEI::getInstance()->validarAuditarPermissao('md_pesq_parametro_listar',__METHOD__,$objParametroPesquisaDTO); | 107 | + SessaoSEI::getInstance()->validarPermissao('md_pesq_parametro_listar',__METHOD__,$objParametroPesquisaDTO); |
| 108 | 108 | ||
| 109 | //Regras de Negocio | 109 | //Regras de Negocio |
| 110 | //$objInfraException = new InfraException(); | 110 | //$objInfraException = new InfraException(); |
| @@ -122,6 +122,21 @@ class MdPesqParametroPesquisaRN extends InfraRN { | @@ -122,6 +122,21 @@ class MdPesqParametroPesquisaRN extends InfraRN { | ||
| 122 | throw new InfraException('Erro listando Parâmetro da Pesquisas.',$e); | 122 | throw new InfraException('Erro listando Parâmetro da Pesquisas.',$e); |
| 123 | } | 123 | } |
| 124 | } | 124 | } |
| 125 | + | ||
| 126 | + | ||
| 127 | + protected function consultarVersaoPeticionamentoConectado(){ | ||
| 128 | + | ||
| 129 | + $objInfraParametroDTO = new InfraParametroDTO(); | ||
| 130 | + $objInfraParametroDTO->setStrNome('VERSAO_MODULO_PETICIONAMENTO'); | ||
| 131 | + $objInfraParametroDTO->retStrValor(); | ||
| 132 | + | ||
| 133 | + $objInfraParametroBD = new InfraParametroBD($this->getObjInfraIBanco()); | ||
| 134 | + $objInfraParametroDTO = $objInfraParametroBD->consultar($objInfraParametroDTO); | ||
| 135 | + | ||
| 136 | + return $objInfraParametroDTO; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + | ||
| 125 | 140 | ||
| 126 | 141 | ||
| 127 | 142 |