Loading config/merged/signature.config.php +4 −65 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ use UnicaenSignature\Service\SignatureConfigurationService; use UnicaenSignature\Service\SignatureConfigurationServiceFactory; use UnicaenSignature\Service\SignatureService; use UnicaenSignature\Service\SignatureServiceFactory; use UnicaenSignature\Strategy\Notification\NotificationLogDebugStrategy; use UnicaenSignature\Strategy\Notification\NotificationLogDebugStrategyFactory; use UnicaenSignature\View\Helpers\MomentFactory; use UnicaenSignature\View\Helpers\UiFactory; Loading Loading @@ -418,15 +420,7 @@ return [ ] ] ], // 'send' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/send/:id', // 'defaults' => [ // 'action' => 'send' // ] // ] // ], 'download' => [ 'type' => Segment::class, 'options' => [ Loading @@ -436,63 +430,7 @@ return [ ] ] ], // process-next-step // 'process-next-step' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/process-next-step/:id', // 'defaults' => [ // 'action' => 'processNextStep' // ] // ] // ], // 'status' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/status/:id', // 'defaults' => [ // 'action' => 'status' // ] // ] // ], // 'trigger-process' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/trigger-process', // 'defaults' => [ // 'action' => 'triggerProcess' // ] // ] // ], // //triggerProcess // 'delete' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/delete/:id', // 'defaults' => [ // 'action' => 'delete' // ] // ] // ], // 'workflows' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/workflows', // 'defaults' => [ // 'action' => 'workflows' // ] // ] // ], // 'letterfiles' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/letterfiles', // 'defaults' => [ // 'action' => 'letterfiles' // ] // ] // ], 'my-documents' => [ 'type' => Segment::class, 'options' => [ Loading @@ -512,6 +450,7 @@ return [ InternalLetterfileService::class => InternalLetterfileServiceFactory::class, LetterfileService::class => LetterfileServiceFactory::class, LoggerService::class => LoggerServiceFactory::class, NotificationLogDebugStrategy::class => NotificationLogDebugStrategyFactory::class, SignatureConfigurationService::class => SignatureConfigurationServiceFactory::class, SignatureService::class => SignatureServiceFactory::class, ProcessService::class => ProcessServiceFactory::class, Loading config/module.config.php +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ return [ 'unicaen-signature' => [ 'get_recipients_methods' => [ [ 'key' => \UnicaenSignature\Utils\SignatureConstants::GET_RECIPIENTS_METHOD_FIXED, 'label' => 'Destinataires fixes', Loading config/unicaen-signature.local.php.dist +51 −44 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ return [ /** **/ 'unicaen-signature' => [ 'enabled' => true, ///////////////////////////////////////////////////////////////////////////////// // DEVELOPPEMENT 'vite_mode' => 'prod', // mode développement de l'UI // Mode dev (voir doc) // 'vite_mode' => 'dev', // mode développement de l'UI // Emplacement où sont archivés les document en cours de signature // Emplacement où sont archivés les documents en cours de signature 'documents_path' => __DIR__ . '/../../data/documents/signature', Loading @@ -21,7 +21,7 @@ return [ 'logger' => [ /////////////////////////////////////// // Activation d'un logger autonome 'enable' => false, // Actif 'enable' => true, // Actif 'level' => \Monolog\Logger::INFO, // Niveau de log 'file' => __DIR__ . '/../../logs/signature.log', // Fichier d'écriture 'file_permission' => 0666, Loading @@ -33,8 +33,8 @@ return [ /////////////////////////////////////// /// Logger complémentaire (celui de l'application utilisant le module) /// -> implementation de LoggerInterface (ex: Monolog) 'customLogger' => null // 'customLogger' => 'Logger' // customLogger (LoggerInterface) 'customLogger' => null // customLogger (LoggerInterface) ], ///////////////////////////////////////////////////////////////////////////////// Loading @@ -46,74 +46,78 @@ return [ * si l'utilisateur courant est autorisé à Valider/Refuser le document. */ 'current_user' => function (ContainerInterface $sc): string { $person = $sc->get(\Oscar\Service\OscarUserContext::class)->getCurrentPerson(); if ($person) { return $person->getEmail(); } // retourne l'email de l'utilisateur courant return ""; }, 'notifications_messages' => [ 'base_url' => 'http://localhost', 'subject' => 'Document à {ACTION} sur OSCAR(dev)', 'body' => "Bonjour {FULLNAME},\r\nVous avez un document à {ACTION} sur OSCAR(dev). \r\n {URL} " ///////////////////////////////////////////////// ADRESSE ROOT du OSCAR ICI /// 'base_url' => 'http://localhost' ], /** * Liste des procédures déclenchées lors des notifications. */ 'notifications' => [ function ( ContainerInterface $sc, \UnicaenSignature\Entity\Db\SignatureRecipient $recipient, string $subject, string $message ): void { $logger = $sc->get("Logger"); $logger->debug("CONFIG:Notification $recipient | $subject | $message"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Diffusion des notifications 'notification_strategy' => [ /**** function(ContainerInterface $container, string $email, string $subject, string $message) { $logger = $container->get("Logger"); try { /** @var \Oscar\Service\MailingService $mailer */ $mailer = $sc->get(\Oscar\Service\MailingService::class); $mailer = $container->get(\Oscar\Service\MailingService::class); $mail = $mailer->newMessage($subject); $mail->setTo($recipient->getEmail()) $mail->setTo($email) ->setSubject($subject) ->setBody($message); $mailer->send($mail); } catch (Exception $e) { $logger->error("ERREUR MAIL SIGNATURE : ". $e->getMessage()); } } /****/ ], /** * Méthodes personnalisées de récupération des utilisateurs (PROCESS) * Méthodes personnalisées de récupération des utilisateurs * * La finalité est d'obtenir une liste de destinataires sous la forme : * [ * ['email'=>string, 'firstname'=>string, 'lastname'=>string ], * ['email'=>string, 'firstname'=>string, 'lastname'=>string ], * ] * * Note : firstname/lastname sont optionnels */ 'get_recipients_methods' => [], 'get_recipients_methods' => [ [ // Configuration des parapheurs numérique ], ], // Configuration des parafeurs numérique 'letterfiles' => [ //////////////////////////////////////////////////////////////////////////////////////////////////////////// /// ESUP /************ ESUP *** [ // Nom visible côté applicatif 'label' => 'ESUP', // Code/Clef (unique) // Code (unique) 'name' => 'esup', 'description' => 'Parapheur numérique ESUP', 'description' => 'Parafeur numérique ESUP', // Utilisé par défaut 'default' => true, // URL d'accès au parapheur pour les destinataires 'url_recipient' => 'https://signature-pp.unicaen.fr', // [DEV] Emplacement où sont archivés les échanges de données ave le parapheur 'archive_exchange' => __DIR__.'/../../logs/signature_exchange', // Classe 'class' => \UnicaenSignature\Strategy\Letterfile\Esup\EsupLetterfileStrategy::class, // Archivage des échanges avec ESUP (Retour d'ESUP) // 'archive_exchange' => __DIR__.'/../../logs/parapheur/esup', // Niveaux de signature disponible 'levels' => [ \UnicaenSignature\Utils\SignatureConstants::VISA_HIDDEN => 'hidden', Loading @@ -123,7 +127,7 @@ return [ \UnicaenSignature\Utils\SignatureConstants::SIGN_EIDAS => 'nexuSign', ], // Configuration du parapheur // Configuration du parafeur 'config' => [ // ESUP configuration 'url' => "https://signature-pp.unicaen.fr", Loading @@ -132,24 +136,27 @@ return [ 'createdByEppn' => 'bouvry@unicaen.fr', ] ], /************/ //////////////////////////////////////////////////////////////////////////////////////////////////////////// /// OSCAR (Viseur interne) /************ INTERNAL *** [ 'label' => 'OSCAR visa', 'label' => 'INTERNAL visa', 'name' => 'internal', // internal est une clef dédiée pour identifier le parapheur interne 'default' => false, 'class' => \UnicaenSignature\Strategy\Letterfile\InternalVisa\InternalVisaStrategy::class, 'url_recipient' => 'http://localhost/signature/my-documents', 'url_visa' => 'http://localhost/signature/my-documents', 'levels' => [ 'visa_hidden' => 'visa_hidden', ], 'config' => [ 'checkUserAcces' => function ($sc, $signatureRecipient) { 'checkUserAccess' => function ($sc, $signatureRecipient) { return true; //return $sc->get(\Oscar\Service\ProjectGrantService::class)->getRecipients($options); } ] ] /************/ ] ] /******/ Loading config/unicaen-signature.local.php.full-dist +33 −31 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ return [ /** **/ 'unicaen-signature' => [ 'enabled' => true, ///////////////////////////////////////////////////////////////////////////////// // DEVELOPPEMENT 'vite_mode' => 'prod', // mode développement de l'UI // Mode dev (voir doc) // 'vite_mode' => 'dev', // mode développement de l'UI // Emplacement où sont archivés les document en cours de signature // Emplacement où sont archivés les documents en cours de signature 'documents_path' => __DIR__ . '/../../data/documents/signature', Loading @@ -22,7 +22,7 @@ return [ /////////////////////////////////////// // Activation d'un logger autonome 'enable' => true, // Actif 'level' => \Monolog\Logger::DEBUG, // Niveau de log 'level' => \Monolog\Logger::INFO, // Niveau de log 'file' => __DIR__ . '/../../logs/signature.log', // Fichier d'écriture 'file_permission' => 0666, Loading @@ -33,8 +33,8 @@ return [ /////////////////////////////////////// /// Logger complémentaire (celui de l'application utilisant le module) /// -> implementation de LoggerInterface (ex: Monolog) 'customLogger' => null //'customLogger' => 'Logger' // customLogger (LoggerInterface) // 'customLogger' => null 'customLogger' => 'Logger' // customLogger (LoggerInterface) ], ///////////////////////////////////////////////////////////////////////////////// Loading @@ -54,36 +54,27 @@ return [ }, 'notifications_messages' => [ 'base_url' => 'http://localhost', 'subject' => 'Document à {ACTION} sur OSCAR(dev)', 'body' => "Bonjour {FULLNAME},\r\nVous avez un document à {ACTION} sur OSCAR(dev). \r\n {URL} " ///////////////////////////////////////////////// ADRESSE ROOT du OSCAR ICI /// 'base_url' => 'http://localhost' ], /** * Liste des procédures déclenchées lors des notifications. */ 'notifications' => [ function ( ContainerInterface $sc, \UnicaenSignature\Entity\Db\SignatureRecipient $recipient, string $subject, string $message ): void { $logger = $sc->get("Logger"); $logger->debug("CONFIG:Notification $recipient | $subject | $message"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Diffusion des notifications 'notification_strategy' => [ function(ContainerInterface $container, string $email, string $subject, string $message) { $logger = $container->get("Logger"); try { /** @var \Oscar\Service\MailingService $mailer */ $mailer = $sc->get(\Oscar\Service\MailingService::class); $mailer = $container->get(\Oscar\Service\MailingService::class); $mail = $mailer->newMessage($subject); $mail->setTo($recipient->getEmail()) $mail->setTo($email) ->setSubject($subject) ->setBody($message); $mailer->send($mail); } catch (Exception $e) { $logger->error("ERREUR MAIL SIGNATURE : ". $e->getMessage()); } } ], Loading Loading @@ -178,20 +169,28 @@ return [ ], ], // Configuration des parapheurs numérique // Configuration des parafeurs numérique 'letterfiles' => [ /************/ [ // Nom visible côté applicatif 'label' => 'ESUP', // Code/Clef (unique) // Code (unique) 'name' => 'esup', 'description' => 'Parapheur numérique ESUP', 'description' => 'Parafeur numérique ESUP', // Utilisé par défaut 'default' => true, // URL d'accès au parapheur pour les destinataires 'url_recipient' => 'https://signature-pp.unicaen.fr', // [DEV] Emplacement où sont archivés les échanges de données ave le parapheur 'archive_exchange' => __DIR__.'/../../logs/signature_exchange', // Classe 'class' => \UnicaenSignature\Strategy\Letterfile\Esup\EsupLetterfileStrategy::class, Loading @@ -204,7 +203,7 @@ return [ \UnicaenSignature\Utils\SignatureConstants::SIGN_EIDAS => 'nexuSign', ], // Configuration du parapheur // Configuration du parafeur 'config' => [ // ESUP configuration 'url' => "https://signature-pp.unicaen.fr", Loading @@ -218,16 +217,19 @@ return [ 'name' => 'internal', // internal est une clef dédiée pour identifier le parapheur interne 'default' => false, 'class' => \UnicaenSignature\Strategy\Letterfile\InternalVisa\InternalVisaStrategy::class, 'url_recipient' => 'http://localhost/signature/my-documents', 'url_visa' => 'http://localhost/signature/my-documents', 'levels' => [ 'visa_hidden' => 'visa_hidden', ], 'config' => [ 'checkUserAcces' => function ($sc, $signatureRecipient) { 'checkUserAccess' => function ($sc, $signatureRecipient) { return true; //return $sc->get(\Oscar\Service\ProjectGrantService::class)->getRecipients($options); } ] ] /************/ ] ] /******/ Loading doc/dev/database-install-sql.md +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ CREATE TABLE unicaen_signature_recipient datefinished timestamp(0) NULL DEFAULT NULL::timestamp without time zone, keyaccess varchar(255) NULL DEFAULT NULL::character varying, informations varchar(255) NULL DEFAULT NULL::character varying, urlDocument VARCHAR(255) DEFAULT NULL::character varying, CONSTRAINT unicaen_signature_recipient_pkey PRIMARY KEY (id), CONSTRAINT fk_f47c5330ed61183a FOREIGN KEY (signature_id) REFERENCES unicaen_signature_signature (id) ); Loading Loading
config/merged/signature.config.php +4 −65 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ use UnicaenSignature\Service\SignatureConfigurationService; use UnicaenSignature\Service\SignatureConfigurationServiceFactory; use UnicaenSignature\Service\SignatureService; use UnicaenSignature\Service\SignatureServiceFactory; use UnicaenSignature\Strategy\Notification\NotificationLogDebugStrategy; use UnicaenSignature\Strategy\Notification\NotificationLogDebugStrategyFactory; use UnicaenSignature\View\Helpers\MomentFactory; use UnicaenSignature\View\Helpers\UiFactory; Loading Loading @@ -418,15 +420,7 @@ return [ ] ] ], // 'send' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/send/:id', // 'defaults' => [ // 'action' => 'send' // ] // ] // ], 'download' => [ 'type' => Segment::class, 'options' => [ Loading @@ -436,63 +430,7 @@ return [ ] ] ], // process-next-step // 'process-next-step' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/process-next-step/:id', // 'defaults' => [ // 'action' => 'processNextStep' // ] // ] // ], // 'status' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/status/:id', // 'defaults' => [ // 'action' => 'status' // ] // ] // ], // 'trigger-process' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/trigger-process', // 'defaults' => [ // 'action' => 'triggerProcess' // ] // ] // ], // //triggerProcess // 'delete' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/delete/:id', // 'defaults' => [ // 'action' => 'delete' // ] // ] // ], // 'workflows' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/workflows', // 'defaults' => [ // 'action' => 'workflows' // ] // ] // ], // 'letterfiles' => [ // 'type' => Segment::class, // 'options' => [ // 'route' => '/letterfiles', // 'defaults' => [ // 'action' => 'letterfiles' // ] // ] // ], 'my-documents' => [ 'type' => Segment::class, 'options' => [ Loading @@ -512,6 +450,7 @@ return [ InternalLetterfileService::class => InternalLetterfileServiceFactory::class, LetterfileService::class => LetterfileServiceFactory::class, LoggerService::class => LoggerServiceFactory::class, NotificationLogDebugStrategy::class => NotificationLogDebugStrategyFactory::class, SignatureConfigurationService::class => SignatureConfigurationServiceFactory::class, SignatureService::class => SignatureServiceFactory::class, ProcessService::class => ProcessServiceFactory::class, Loading
config/module.config.php +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,8 @@ return [ 'unicaen-signature' => [ 'get_recipients_methods' => [ [ 'key' => \UnicaenSignature\Utils\SignatureConstants::GET_RECIPIENTS_METHOD_FIXED, 'label' => 'Destinataires fixes', Loading
config/unicaen-signature.local.php.dist +51 −44 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ return [ /** **/ 'unicaen-signature' => [ 'enabled' => true, ///////////////////////////////////////////////////////////////////////////////// // DEVELOPPEMENT 'vite_mode' => 'prod', // mode développement de l'UI // Mode dev (voir doc) // 'vite_mode' => 'dev', // mode développement de l'UI // Emplacement où sont archivés les document en cours de signature // Emplacement où sont archivés les documents en cours de signature 'documents_path' => __DIR__ . '/../../data/documents/signature', Loading @@ -21,7 +21,7 @@ return [ 'logger' => [ /////////////////////////////////////// // Activation d'un logger autonome 'enable' => false, // Actif 'enable' => true, // Actif 'level' => \Monolog\Logger::INFO, // Niveau de log 'file' => __DIR__ . '/../../logs/signature.log', // Fichier d'écriture 'file_permission' => 0666, Loading @@ -33,8 +33,8 @@ return [ /////////////////////////////////////// /// Logger complémentaire (celui de l'application utilisant le module) /// -> implementation de LoggerInterface (ex: Monolog) 'customLogger' => null // 'customLogger' => 'Logger' // customLogger (LoggerInterface) 'customLogger' => null // customLogger (LoggerInterface) ], ///////////////////////////////////////////////////////////////////////////////// Loading @@ -46,74 +46,78 @@ return [ * si l'utilisateur courant est autorisé à Valider/Refuser le document. */ 'current_user' => function (ContainerInterface $sc): string { $person = $sc->get(\Oscar\Service\OscarUserContext::class)->getCurrentPerson(); if ($person) { return $person->getEmail(); } // retourne l'email de l'utilisateur courant return ""; }, 'notifications_messages' => [ 'base_url' => 'http://localhost', 'subject' => 'Document à {ACTION} sur OSCAR(dev)', 'body' => "Bonjour {FULLNAME},\r\nVous avez un document à {ACTION} sur OSCAR(dev). \r\n {URL} " ///////////////////////////////////////////////// ADRESSE ROOT du OSCAR ICI /// 'base_url' => 'http://localhost' ], /** * Liste des procédures déclenchées lors des notifications. */ 'notifications' => [ function ( ContainerInterface $sc, \UnicaenSignature\Entity\Db\SignatureRecipient $recipient, string $subject, string $message ): void { $logger = $sc->get("Logger"); $logger->debug("CONFIG:Notification $recipient | $subject | $message"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Diffusion des notifications 'notification_strategy' => [ /**** function(ContainerInterface $container, string $email, string $subject, string $message) { $logger = $container->get("Logger"); try { /** @var \Oscar\Service\MailingService $mailer */ $mailer = $sc->get(\Oscar\Service\MailingService::class); $mailer = $container->get(\Oscar\Service\MailingService::class); $mail = $mailer->newMessage($subject); $mail->setTo($recipient->getEmail()) $mail->setTo($email) ->setSubject($subject) ->setBody($message); $mailer->send($mail); } catch (Exception $e) { $logger->error("ERREUR MAIL SIGNATURE : ". $e->getMessage()); } } /****/ ], /** * Méthodes personnalisées de récupération des utilisateurs (PROCESS) * Méthodes personnalisées de récupération des utilisateurs * * La finalité est d'obtenir une liste de destinataires sous la forme : * [ * ['email'=>string, 'firstname'=>string, 'lastname'=>string ], * ['email'=>string, 'firstname'=>string, 'lastname'=>string ], * ] * * Note : firstname/lastname sont optionnels */ 'get_recipients_methods' => [], 'get_recipients_methods' => [ [ // Configuration des parapheurs numérique ], ], // Configuration des parafeurs numérique 'letterfiles' => [ //////////////////////////////////////////////////////////////////////////////////////////////////////////// /// ESUP /************ ESUP *** [ // Nom visible côté applicatif 'label' => 'ESUP', // Code/Clef (unique) // Code (unique) 'name' => 'esup', 'description' => 'Parapheur numérique ESUP', 'description' => 'Parafeur numérique ESUP', // Utilisé par défaut 'default' => true, // URL d'accès au parapheur pour les destinataires 'url_recipient' => 'https://signature-pp.unicaen.fr', // [DEV] Emplacement où sont archivés les échanges de données ave le parapheur 'archive_exchange' => __DIR__.'/../../logs/signature_exchange', // Classe 'class' => \UnicaenSignature\Strategy\Letterfile\Esup\EsupLetterfileStrategy::class, // Archivage des échanges avec ESUP (Retour d'ESUP) // 'archive_exchange' => __DIR__.'/../../logs/parapheur/esup', // Niveaux de signature disponible 'levels' => [ \UnicaenSignature\Utils\SignatureConstants::VISA_HIDDEN => 'hidden', Loading @@ -123,7 +127,7 @@ return [ \UnicaenSignature\Utils\SignatureConstants::SIGN_EIDAS => 'nexuSign', ], // Configuration du parapheur // Configuration du parafeur 'config' => [ // ESUP configuration 'url' => "https://signature-pp.unicaen.fr", Loading @@ -132,24 +136,27 @@ return [ 'createdByEppn' => 'bouvry@unicaen.fr', ] ], /************/ //////////////////////////////////////////////////////////////////////////////////////////////////////////// /// OSCAR (Viseur interne) /************ INTERNAL *** [ 'label' => 'OSCAR visa', 'label' => 'INTERNAL visa', 'name' => 'internal', // internal est une clef dédiée pour identifier le parapheur interne 'default' => false, 'class' => \UnicaenSignature\Strategy\Letterfile\InternalVisa\InternalVisaStrategy::class, 'url_recipient' => 'http://localhost/signature/my-documents', 'url_visa' => 'http://localhost/signature/my-documents', 'levels' => [ 'visa_hidden' => 'visa_hidden', ], 'config' => [ 'checkUserAcces' => function ($sc, $signatureRecipient) { 'checkUserAccess' => function ($sc, $signatureRecipient) { return true; //return $sc->get(\Oscar\Service\ProjectGrantService::class)->getRecipients($options); } ] ] /************/ ] ] /******/ Loading
config/unicaen-signature.local.php.full-dist +33 −31 Original line number Diff line number Diff line Loading @@ -6,13 +6,13 @@ return [ /** **/ 'unicaen-signature' => [ 'enabled' => true, ///////////////////////////////////////////////////////////////////////////////// // DEVELOPPEMENT 'vite_mode' => 'prod', // mode développement de l'UI // Mode dev (voir doc) // 'vite_mode' => 'dev', // mode développement de l'UI // Emplacement où sont archivés les document en cours de signature // Emplacement où sont archivés les documents en cours de signature 'documents_path' => __DIR__ . '/../../data/documents/signature', Loading @@ -22,7 +22,7 @@ return [ /////////////////////////////////////// // Activation d'un logger autonome 'enable' => true, // Actif 'level' => \Monolog\Logger::DEBUG, // Niveau de log 'level' => \Monolog\Logger::INFO, // Niveau de log 'file' => __DIR__ . '/../../logs/signature.log', // Fichier d'écriture 'file_permission' => 0666, Loading @@ -33,8 +33,8 @@ return [ /////////////////////////////////////// /// Logger complémentaire (celui de l'application utilisant le module) /// -> implementation de LoggerInterface (ex: Monolog) 'customLogger' => null //'customLogger' => 'Logger' // customLogger (LoggerInterface) // 'customLogger' => null 'customLogger' => 'Logger' // customLogger (LoggerInterface) ], ///////////////////////////////////////////////////////////////////////////////// Loading @@ -54,36 +54,27 @@ return [ }, 'notifications_messages' => [ 'base_url' => 'http://localhost', 'subject' => 'Document à {ACTION} sur OSCAR(dev)', 'body' => "Bonjour {FULLNAME},\r\nVous avez un document à {ACTION} sur OSCAR(dev). \r\n {URL} " ///////////////////////////////////////////////// ADRESSE ROOT du OSCAR ICI /// 'base_url' => 'http://localhost' ], /** * Liste des procédures déclenchées lors des notifications. */ 'notifications' => [ function ( ContainerInterface $sc, \UnicaenSignature\Entity\Db\SignatureRecipient $recipient, string $subject, string $message ): void { $logger = $sc->get("Logger"); $logger->debug("CONFIG:Notification $recipient | $subject | $message"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Diffusion des notifications 'notification_strategy' => [ function(ContainerInterface $container, string $email, string $subject, string $message) { $logger = $container->get("Logger"); try { /** @var \Oscar\Service\MailingService $mailer */ $mailer = $sc->get(\Oscar\Service\MailingService::class); $mailer = $container->get(\Oscar\Service\MailingService::class); $mail = $mailer->newMessage($subject); $mail->setTo($recipient->getEmail()) $mail->setTo($email) ->setSubject($subject) ->setBody($message); $mailer->send($mail); } catch (Exception $e) { $logger->error("ERREUR MAIL SIGNATURE : ". $e->getMessage()); } } ], Loading Loading @@ -178,20 +169,28 @@ return [ ], ], // Configuration des parapheurs numérique // Configuration des parafeurs numérique 'letterfiles' => [ /************/ [ // Nom visible côté applicatif 'label' => 'ESUP', // Code/Clef (unique) // Code (unique) 'name' => 'esup', 'description' => 'Parapheur numérique ESUP', 'description' => 'Parafeur numérique ESUP', // Utilisé par défaut 'default' => true, // URL d'accès au parapheur pour les destinataires 'url_recipient' => 'https://signature-pp.unicaen.fr', // [DEV] Emplacement où sont archivés les échanges de données ave le parapheur 'archive_exchange' => __DIR__.'/../../logs/signature_exchange', // Classe 'class' => \UnicaenSignature\Strategy\Letterfile\Esup\EsupLetterfileStrategy::class, Loading @@ -204,7 +203,7 @@ return [ \UnicaenSignature\Utils\SignatureConstants::SIGN_EIDAS => 'nexuSign', ], // Configuration du parapheur // Configuration du parafeur 'config' => [ // ESUP configuration 'url' => "https://signature-pp.unicaen.fr", Loading @@ -218,16 +217,19 @@ return [ 'name' => 'internal', // internal est une clef dédiée pour identifier le parapheur interne 'default' => false, 'class' => \UnicaenSignature\Strategy\Letterfile\InternalVisa\InternalVisaStrategy::class, 'url_recipient' => 'http://localhost/signature/my-documents', 'url_visa' => 'http://localhost/signature/my-documents', 'levels' => [ 'visa_hidden' => 'visa_hidden', ], 'config' => [ 'checkUserAcces' => function ($sc, $signatureRecipient) { 'checkUserAccess' => function ($sc, $signatureRecipient) { return true; //return $sc->get(\Oscar\Service\ProjectGrantService::class)->getRecipients($options); } ] ] /************/ ] ] /******/ Loading
doc/dev/database-install-sql.md +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ CREATE TABLE unicaen_signature_recipient datefinished timestamp(0) NULL DEFAULT NULL::timestamp without time zone, keyaccess varchar(255) NULL DEFAULT NULL::character varying, informations varchar(255) NULL DEFAULT NULL::character varying, urlDocument VARCHAR(255) DEFAULT NULL::character varying, CONSTRAINT unicaen_signature_recipient_pkey PRIMARY KEY (id), CONSTRAINT fk_f47c5330ed61183a FOREIGN KEY (signature_id) REFERENCES unicaen_signature_signature (id) ); Loading