Esempio n. 1
0
 /**
  * Sobrescrito método de download de arquivos,
  * para fazer a validação de permissão do usuário
  * com o anexo.
  */
 public function downloadfileAction()
 {
     $usuarioSession = new Container('Login');
     $fileId = (int) $this->params()->fromRoute("id");
     if (!empty($fileId)) {
         $anexoDao = new AnexoDao($this->getEntityManager());
         $anexo = $anexoDao->obterAnexoPeloArquivoEUsuario($fileId, $usuarioSession->iduser);
         if (!empty($anexo)) {
             parent::downloadfileAction();
         }
     }
 }