Commit 8f0c41fd authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Le document pour les visa interne s'affiche correctement

parent c9faa0cf
Loading
Loading
Loading
Loading
Loading
+9 −4
Changes for src/Controller/InternalLetterfileController.php: 9 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -102,12 +102,17 @@ class InternalLetterfileController extends AbstractActionController
            }

            $signatureRecipient = $this->getInternalLetterfileService()->getSignatureRecipientByKey($key);
            if( $signatureRecipient->getEmail() != $this->getInternalLetterfileService()->getSignatureConfigurationService()->getCurrentUserMail() ){
                throw new UnAuthorizedException();

            $this->getInternalLetterfileService()->getLoggerService()->debug("Consultation du document '$key'");
            $currentUserMail = $this->getInternalLetterfileService()->getSignatureConfigurationService()->getCurrentUserMail();

            if( $signatureRecipient->getEmail() != $currentUserMail ){
                $this->getInternalLetterfileService()->getLoggerService()->errorLogAndThrow(
                    "Consultation non autorisée pour " . $currentUserMail
                );
            }
            $documentInfos = $this->getInternalLetterfileService()->getDocumentByRecipient($signatureRecipient);

            header('Content-Type: ' . $documentInfos['mime']);
            if( $documentInfos['mime'] ) header('Content-Type: ' . $documentInfos['mime']);
            header('Content-Transfer-Encoding: Binary');
            header('Expires: 0');
            header('Cache-Control: must-revalidate');
+1 −1
Changes for src/Service/SignatureService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -623,7 +623,7 @@ class SignatureService
                $this->getLoggerService()->error("Error PARAPHEUR : " . $exception->getMessage());
                throw new SignatureException("Impossible de supprimer la demande du parafeur");
            }
            $this->updateStatusSignature($signature);
            // $this->updateStatusSignature($signature);
        }

        if ($removedoc) {