Loading data/SQL/privilege.sql +30 Changes for data/SQL/privilege.sql: 30 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,36 @@ insert into ROLE_PRIVILEGE(ROLE_ID, PRIVILEGE_ID) ; -- -- Ajout de ROLE_PRIVILEGE_MODELE. -- INSERT INTO ROLE_PRIVILEGE_MODELE (ROLE_CODE, PRIVILEGE_ID) with data(role, priv) as ( select 'ADMIN', 'refresh-these' from dual union select 'ADMIN_TECH', 'refresh-these' from dual union select 'BU', 'refresh-these' from dual union select 'BDD', 'refresh-these' from dual ) select role, p.id from data join PRIVILEGE p on p.code = data.priv ; -- -- Application des modèles (ceux pas déjà appliqués). -- insert into ROLE_PRIVILEGE (ROLE_ID, PRIVILEGE_ID) SELECT r.id, p.ID from ROLE_PRIVILEGE_MODELE rpm join role r on r.CODE = rpm.ROLE_CODE join PRIVILEGE p on p.id = rpm.PRIVILEGE_ID where not exists ( select * from ROLE_PRIVILEGE rp where rp.ROLE_ID = r.id and rp.PRIVILEGE_ID = p.id ); -- -- Mise en conformité brutale entre 2 bdd des CATEGORIE_PRIVILEGE, PRIVILEGE, ROLE_PRIVILEGE. -- Loading module/Application/config/others/these.config.php +20 Changes for module/Application/config/others/these.config.php: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ return [ ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_INITIALE, ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_CORRIGEE, ThesePrivileges::THESE_SAISIE_RDV_BU, // ThesePrivileges::THESE_REFRESH, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading Loading @@ -95,6 +96,13 @@ return [ 'privileges' => ThesePrivileges::THESE_CONSULTATION_FICHE, 'assertion' => 'Assertion\\These', ], [ 'controller' => 'Application\Controller\These', 'action' => [ 'refresh-these', ], 'privileges' => ThesePrivileges::THESE_REFRESH, ], [ 'controller' => 'Application\Controller\These', 'action' => [ Loading Loading @@ -347,6 +355,18 @@ return [ ], ], ], 'refresh-these' => [ 'type' => 'Segment', 'options' => [ 'route' => '/refresh/:these', 'constraints' => [ 'these' => '\d+', ], 'defaults' => [ 'action' => 'refresh-these', ], ], ], 'version-papier' => [ 'type' => 'Segment', 'options' => [ Loading module/Application/src/Application/Controller/Factory/TheseControllerFactory.php +4 Changes for module/Application/src/Application/Controller/Factory/TheseControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use Application\Service\Variable\VariableService; use Application\Service\VersionFichier\VersionFichierService; use Application\Service\Workflow\WorkflowService; use Doctrine\ORM\EntityManager; use Import\Service\ImportService; use Zend\Mvc\Controller\ControllerManager; use Zend\ServiceManager\ServiceLocatorInterface; Loading Loading @@ -45,6 +46,7 @@ class TheseControllerFactory * @var UniteRechercheService $uniteService * @var MailConfirmationService $mailConfirmationService * @var EntityManager $entityManager * @var ImportService $importService */ $variableService = $controllerManager->getServiceLocator()->get('VariableService'); $validationService = $controllerManager->getServiceLocator()->get('ValidationService'); Loading @@ -59,6 +61,7 @@ class TheseControllerFactory $mailConfirmationService = $controllerManager->getServiceLocator()->get('MailConfirmationService'); $entityManager = $controllerManager->getServiceLocator()->get('doctrine.entitymanager.orm_default'); $notifierService = $controllerManager->getServiceLocator()->get(NotifierService::class); $importService = $controllerManager->getServiceLocator()->get('ImportService'); $controller = new TheseController(); $controller->setTimeoutRetraitement($this->getTimeoutRetraitementFromOptions($options)); Loading @@ -75,6 +78,7 @@ class TheseControllerFactory $controller->setMailConfirmationService($mailConfirmationService); $controller->setEntityManager($entityManager); $controller->setNotifierService($notifierService); $controller->setImportService($importService); return $controller; } Loading module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php +2 Changes for module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ use Zend\Mvc\Controller\Plugin\AbstractPlugin; /** * Aide de vue de génération d'URL. * * @method string refreshTheseUrl(These $these, $redirect = null) * @method validationPageDeCouvertureUrl(These $these) * @method depotFichiers(These $these, $nature, $version = null, $retraite = false, array $queryParams = []) * @method identiteThese(These $these) * @method depotThese(These $these, $version = null) Loading module/Application/src/Application/Controller/TheseController.php +22 Changes for module/Application/src/Application/Controller/TheseController.php: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ use Application\Service\VersionFichier\VersionFichierServiceAwareTrait; use Application\Service\Workflow\WorkflowServiceAwareTrait; use Doctrine\ORM\Tools\Pagination\Paginator; use DoctrineORMModule\Paginator\Adapter\DoctrinePaginator; use Import\Service\Traits\ImportServiceAwareTrait; use mPDF; use Retraitement\Exception\TimedOutCommandException; use UnicaenApp\Exception\RuntimeException; Loading Loading @@ -72,6 +73,7 @@ class TheseController extends AbstractController use EntityManagerAwareTrait; use MailConfirmationServiceAwareTrait; use UniteRechercheServiceAwareTrait; use ImportServiceAwareTrait; private $timeoutRetraitement; Loading Loading @@ -254,6 +256,25 @@ class TheseController extends AbstractController return $view; } /** * Import forcé d'une thèse et des inf. * * @return Response */ public function refreshTheseAction() { $these = $this->requestedThese(); $this->importService->updateThese($these); $redirect = $this->params()->fromQuery('redirect', '/'); return $this->redirect()->toUrl($redirect); } /** * @return ViewModel */ public function validationPageDeCouvertureAction() { $these = $this->requestedThese(); Loading @@ -269,6 +290,7 @@ class TheseController extends AbstractController 'these' => $these, 'validation' => $validation ?: null, 'apercevoirPdcUrl' => $this->urlFichierThese()->apercevoirPageDeCouverture($these), 'refreshTheseUrl' => $this->urlThese()->refreshTheseUrl($these, $this->urlThese()->validationPageDeCouvertureUrl($these)), 'validerUrl' => $this->urlThese()->validerPageDeCouvertureUrl($these), 'devaliderUrl' => $this->urlThese()->devaliderPageDeCouvertureUrl($these), 'nextStepUrl' => $this->urlWorkflow()->nextStepBox($these, null, [WfEtape::CODE_VALIDATION_PAGE_DE_COUVERTURE]), Loading Loading
data/SQL/privilege.sql +30 Changes for data/SQL/privilege.sql: 30 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -24,6 +24,36 @@ insert into ROLE_PRIVILEGE(ROLE_ID, PRIVILEGE_ID) ; -- -- Ajout de ROLE_PRIVILEGE_MODELE. -- INSERT INTO ROLE_PRIVILEGE_MODELE (ROLE_CODE, PRIVILEGE_ID) with data(role, priv) as ( select 'ADMIN', 'refresh-these' from dual union select 'ADMIN_TECH', 'refresh-these' from dual union select 'BU', 'refresh-these' from dual union select 'BDD', 'refresh-these' from dual ) select role, p.id from data join PRIVILEGE p on p.code = data.priv ; -- -- Application des modèles (ceux pas déjà appliqués). -- insert into ROLE_PRIVILEGE (ROLE_ID, PRIVILEGE_ID) SELECT r.id, p.ID from ROLE_PRIVILEGE_MODELE rpm join role r on r.CODE = rpm.ROLE_CODE join PRIVILEGE p on p.id = rpm.PRIVILEGE_ID where not exists ( select * from ROLE_PRIVILEGE rp where rp.ROLE_ID = r.id and rp.PRIVILEGE_ID = p.id ); -- -- Mise en conformité brutale entre 2 bdd des CATEGORIE_PRIVILEGE, PRIVILEGE, ROLE_PRIVILEGE. -- Loading
module/Application/config/others/these.config.php +20 Changes for module/Application/config/others/these.config.php: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ return [ ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_INITIALE, ThesePrivileges::THESE_SAISIE_CONFORMITE_VERSION_ARCHIVAGE_CORRIGEE, ThesePrivileges::THESE_SAISIE_RDV_BU, // ThesePrivileges::THESE_REFRESH, ], 'resources' => ['These'], 'assertion' => 'Assertion\\These', Loading Loading @@ -95,6 +96,13 @@ return [ 'privileges' => ThesePrivileges::THESE_CONSULTATION_FICHE, 'assertion' => 'Assertion\\These', ], [ 'controller' => 'Application\Controller\These', 'action' => [ 'refresh-these', ], 'privileges' => ThesePrivileges::THESE_REFRESH, ], [ 'controller' => 'Application\Controller\These', 'action' => [ Loading Loading @@ -347,6 +355,18 @@ return [ ], ], ], 'refresh-these' => [ 'type' => 'Segment', 'options' => [ 'route' => '/refresh/:these', 'constraints' => [ 'these' => '\d+', ], 'defaults' => [ 'action' => 'refresh-these', ], ], ], 'version-papier' => [ 'type' => 'Segment', 'options' => [ Loading
module/Application/src/Application/Controller/Factory/TheseControllerFactory.php +4 Changes for module/Application/src/Application/Controller/Factory/TheseControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use Application\Service\Variable\VariableService; use Application\Service\VersionFichier\VersionFichierService; use Application\Service\Workflow\WorkflowService; use Doctrine\ORM\EntityManager; use Import\Service\ImportService; use Zend\Mvc\Controller\ControllerManager; use Zend\ServiceManager\ServiceLocatorInterface; Loading Loading @@ -45,6 +46,7 @@ class TheseControllerFactory * @var UniteRechercheService $uniteService * @var MailConfirmationService $mailConfirmationService * @var EntityManager $entityManager * @var ImportService $importService */ $variableService = $controllerManager->getServiceLocator()->get('VariableService'); $validationService = $controllerManager->getServiceLocator()->get('ValidationService'); Loading @@ -59,6 +61,7 @@ class TheseControllerFactory $mailConfirmationService = $controllerManager->getServiceLocator()->get('MailConfirmationService'); $entityManager = $controllerManager->getServiceLocator()->get('doctrine.entitymanager.orm_default'); $notifierService = $controllerManager->getServiceLocator()->get(NotifierService::class); $importService = $controllerManager->getServiceLocator()->get('ImportService'); $controller = new TheseController(); $controller->setTimeoutRetraitement($this->getTimeoutRetraitementFromOptions($options)); Loading @@ -75,6 +78,7 @@ class TheseControllerFactory $controller->setMailConfirmationService($mailConfirmationService); $controller->setEntityManager($entityManager); $controller->setNotifierService($notifierService); $controller->setImportService($importService); return $controller; } Loading
module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php +2 Changes for module/Application/src/Application/Controller/Plugin/Url/UrlThesePlugin.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ use Zend\Mvc\Controller\Plugin\AbstractPlugin; /** * Aide de vue de génération d'URL. * * @method string refreshTheseUrl(These $these, $redirect = null) * @method validationPageDeCouvertureUrl(These $these) * @method depotFichiers(These $these, $nature, $version = null, $retraite = false, array $queryParams = []) * @method identiteThese(These $these) * @method depotThese(These $these, $version = null) Loading
module/Application/src/Application/Controller/TheseController.php +22 Changes for module/Application/src/Application/Controller/TheseController.php: 22 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ use Application\Service\VersionFichier\VersionFichierServiceAwareTrait; use Application\Service\Workflow\WorkflowServiceAwareTrait; use Doctrine\ORM\Tools\Pagination\Paginator; use DoctrineORMModule\Paginator\Adapter\DoctrinePaginator; use Import\Service\Traits\ImportServiceAwareTrait; use mPDF; use Retraitement\Exception\TimedOutCommandException; use UnicaenApp\Exception\RuntimeException; Loading Loading @@ -72,6 +73,7 @@ class TheseController extends AbstractController use EntityManagerAwareTrait; use MailConfirmationServiceAwareTrait; use UniteRechercheServiceAwareTrait; use ImportServiceAwareTrait; private $timeoutRetraitement; Loading Loading @@ -254,6 +256,25 @@ class TheseController extends AbstractController return $view; } /** * Import forcé d'une thèse et des inf. * * @return Response */ public function refreshTheseAction() { $these = $this->requestedThese(); $this->importService->updateThese($these); $redirect = $this->params()->fromQuery('redirect', '/'); return $this->redirect()->toUrl($redirect); } /** * @return ViewModel */ public function validationPageDeCouvertureAction() { $these = $this->requestedThese(); Loading @@ -269,6 +290,7 @@ class TheseController extends AbstractController 'these' => $these, 'validation' => $validation ?: null, 'apercevoirPdcUrl' => $this->urlFichierThese()->apercevoirPageDeCouverture($these), 'refreshTheseUrl' => $this->urlThese()->refreshTheseUrl($these, $this->urlThese()->validationPageDeCouvertureUrl($these)), 'validerUrl' => $this->urlThese()->validerPageDeCouvertureUrl($these), 'devaliderUrl' => $this->urlThese()->devaliderPageDeCouvertureUrl($these), 'nextStepUrl' => $this->urlWorkflow()->nextStepBox($these, null, [WfEtape::CODE_VALIDATION_PAGE_DE_COUVERTURE]), Loading