Loading documentation/release/3.1.7.md +20 −1 Original line number Diff line number Diff line Loading @@ -53,8 +53,25 @@ JOIN unicaen_privilege_categorie cp ON cp.CODE = 'metier'; -- TODO -- ajuster les privilèges en fonction de votre structure ``` * Ajustement des privilèges du module `Element` * Amélioration du module `Element` ```postgresql alter table element_application_element alter column clef set default false; update element_application_element set clef=false where clef IS NULL; alter table element_application_element alter column clef set not null; update unicaen_privilege_privilege set ordre = 40 where code='application_modifier'; update unicaen_privilege_privilege set ordre = 60 where code='application_effacer'; INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE) WITH d(code, lib, ordre) AS ( SELECT 'application_ajouter', 'Ajouter', 30 UNION SELECT 'application_historiser', 'Historiser/Restaurer', 50 UNION SELECT 'application_cartographie', 'Cartographie des applications', 100 ) SELECT cp.id, d.code, d.lib, d.ordre FROM d JOIN unicaen_privilege_categorie cp ON cp.CODE = 'application'; update unicaen_privilege_privilege set ordre = 40 where code='niveau_modifier'; update unicaen_privilege_privilege set ordre = 60 where code='niveau_effacer'; Loading @@ -66,4 +83,6 @@ WITH d(code, lib, ordre) AS ( SELECT cp.id, d.code, d.lib, d.ordre FROM d JOIN unicaen_privilege_categorie cp ON cp.CODE = 'niveau'; -- TODO -- ajuster les privilèges en fonction de votre structure ``` No newline at end of file module/Element/config/merged/application.config.php +32 −5 Original line number Diff line number Diff line Loading @@ -40,11 +40,28 @@ return [ 'controller' => ApplicationController::class, 'action' => [ 'afficher', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AFFICHER, ], ], [ 'controller' => ApplicationController::class, 'action' => [ 'cartographie', 'exporter-cartographie', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AFFICHER, ApplicationPrivileges::APPLICATION_CARTOGRAPHIE, ], ], [ 'controller' => ApplicationController::class, 'action' => [ 'creer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AJOUTER, ], ], [ Loading @@ -52,8 +69,6 @@ return [ 'action' => [ 'changer-status', 'editer', 'historiser', 'restaurer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_MODIFIER, Loading @@ -62,12 +77,14 @@ return [ [ 'controller' => ApplicationController::class, 'action' => [ 'creer', 'historiser', 'restaurer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_MODIFIER, ApplicationPrivileges::APPLICATION_HISTORISER, ], ], [ 'controller' => ApplicationController::class, 'action' => [ Loading Loading @@ -115,6 +132,7 @@ return [ 'options' => [ 'route' => '/application', 'defaults' => [ /** @see ApplicationController::indexAction() */ 'controller' => ApplicationController::class, 'action' => 'index', ], Loading @@ -127,6 +145,7 @@ return [ 'options' => [ 'route' => '/cartographie', 'defaults' => [ /** @see ApplicationController::cartographieAction() */ 'controller' => ApplicationController::class, 'action' => 'cartographie' ], Loading @@ -138,6 +157,7 @@ return [ 'options' => [ 'route' => '/exporter-cartographie', 'defaults' => [ /** @see ApplicationController::exporterCartographieAction() */ 'controller' => ApplicationController::class, 'action' => 'exporter-cartographie' ], Loading @@ -148,6 +168,7 @@ return [ 'options' => [ 'route' => '/afficher/:id', 'defaults' => [ /** @see ApplicationController::afficherAction() */ 'controller' => ApplicationController::class, 'action' => 'afficher', ], Loading @@ -158,6 +179,7 @@ return [ 'options' => [ 'route' => '/changer-status/:id', 'defaults' => [ /** @see ApplicationController::changerStatusAction() */ 'controller' => ApplicationController::class, 'action' => 'changer-status', ], Loading @@ -168,6 +190,7 @@ return [ 'options' => [ 'route' => '/editer/:id', 'defaults' => [ /** @see ApplicationController::editerAction() */ 'controller' => ApplicationController::class, 'action' => 'editer', ], Loading @@ -178,6 +201,7 @@ return [ 'options' => [ 'route' => '/historiser/:id', 'defaults' => [ /** @see ApplicationController::historiserAction() */ 'controller' => ApplicationController::class, 'action' => 'historiser', ], Loading @@ -188,6 +212,7 @@ return [ 'options' => [ 'route' => '/restaurer/:id', 'defaults' => [ /** @see ApplicationController::restaurerAction() */ 'controller' => ApplicationController::class, 'action' => 'restaurer', ], Loading @@ -198,6 +223,7 @@ return [ 'options' => [ 'route' => '/effacer/:id', 'defaults' => [ /** @see ApplicationController::effacerAction() */ 'controller' => ApplicationController::class, 'action' => 'effacer', ], Loading @@ -208,6 +234,7 @@ return [ 'options' => [ 'route' => '/creer', 'defaults' => [ /** @see ApplicationController::creerAction() */ 'controller' => ApplicationController::class, 'action' => 'creer', ], Loading module/Element/src/Element/Controller/ApplicationController.php +2 −2 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ class ApplicationController extends AbstractActionController { return $vm; } public function changerStatusAction() public function changerStatusAction() : Response { $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); Loading Loading @@ -239,7 +239,7 @@ class ApplicationController extends AbstractActionController { } $date = (new DateTime())->format('Ymd-His'); $filename="export_utilisateur_".$date.".csv"; $filename="cartographie_application_".$date.".csv"; $CSV = new CsvModel(); $CSV->setDelimiter(';'); $CSV->setEnclosure('"'); Loading module/Element/src/Element/Controller/ApplicationControllerFactory.php +8 −1 Original line number Diff line number Diff line Loading @@ -13,9 +13,17 @@ use FicheMetier\Service\FicheMetier\FicheMetierService; use Interop\Container\ContainerInterface; use Metier\Service\Domaine\DomaineService; use Metier\Service\Metier\MetierService; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; class ApplicationControllerFactory { /** * @param ContainerInterface $container * @return ApplicationController * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container) : ApplicationController { /** Loading Loading @@ -43,7 +51,6 @@ class ApplicationControllerFactory { $applicationForm = $container->get('FormElementManager')->get(ApplicationForm::class); $applicationElementForm = $container->get('FormElementManager')->get(ApplicationElementForm::class); /** @var ApplicationController $controller */ $controller = new ApplicationController(); $controller->setApplicationService($applicationService); $controller->setApplicationThemeService($applicationGroupeService); Loading module/Element/src/Element/Form/Application/ApplicationForm.php +2 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ class ApplicationForm extends Form { 'type' => Text::class, 'name' => 'libelle', 'options' => [ 'label' => "Libelle :", 'label' => "Libelle <span class='icon icon-obligatoire' title='Champ obligatoire'></span>:", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'libelle', Loading Loading
documentation/release/3.1.7.md +20 −1 Original line number Diff line number Diff line Loading @@ -53,8 +53,25 @@ JOIN unicaen_privilege_categorie cp ON cp.CODE = 'metier'; -- TODO -- ajuster les privilèges en fonction de votre structure ``` * Ajustement des privilèges du module `Element` * Amélioration du module `Element` ```postgresql alter table element_application_element alter column clef set default false; update element_application_element set clef=false where clef IS NULL; alter table element_application_element alter column clef set not null; update unicaen_privilege_privilege set ordre = 40 where code='application_modifier'; update unicaen_privilege_privilege set ordre = 60 where code='application_effacer'; INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE) WITH d(code, lib, ordre) AS ( SELECT 'application_ajouter', 'Ajouter', 30 UNION SELECT 'application_historiser', 'Historiser/Restaurer', 50 UNION SELECT 'application_cartographie', 'Cartographie des applications', 100 ) SELECT cp.id, d.code, d.lib, d.ordre FROM d JOIN unicaen_privilege_categorie cp ON cp.CODE = 'application'; update unicaen_privilege_privilege set ordre = 40 where code='niveau_modifier'; update unicaen_privilege_privilege set ordre = 60 where code='niveau_effacer'; Loading @@ -66,4 +83,6 @@ WITH d(code, lib, ordre) AS ( SELECT cp.id, d.code, d.lib, d.ordre FROM d JOIN unicaen_privilege_categorie cp ON cp.CODE = 'niveau'; -- TODO -- ajuster les privilèges en fonction de votre structure ``` No newline at end of file
module/Element/config/merged/application.config.php +32 −5 Original line number Diff line number Diff line Loading @@ -40,11 +40,28 @@ return [ 'controller' => ApplicationController::class, 'action' => [ 'afficher', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AFFICHER, ], ], [ 'controller' => ApplicationController::class, 'action' => [ 'cartographie', 'exporter-cartographie', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AFFICHER, ApplicationPrivileges::APPLICATION_CARTOGRAPHIE, ], ], [ 'controller' => ApplicationController::class, 'action' => [ 'creer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_AJOUTER, ], ], [ Loading @@ -52,8 +69,6 @@ return [ 'action' => [ 'changer-status', 'editer', 'historiser', 'restaurer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_MODIFIER, Loading @@ -62,12 +77,14 @@ return [ [ 'controller' => ApplicationController::class, 'action' => [ 'creer', 'historiser', 'restaurer', ], 'privileges' => [ ApplicationPrivileges::APPLICATION_MODIFIER, ApplicationPrivileges::APPLICATION_HISTORISER, ], ], [ 'controller' => ApplicationController::class, 'action' => [ Loading Loading @@ -115,6 +132,7 @@ return [ 'options' => [ 'route' => '/application', 'defaults' => [ /** @see ApplicationController::indexAction() */ 'controller' => ApplicationController::class, 'action' => 'index', ], Loading @@ -127,6 +145,7 @@ return [ 'options' => [ 'route' => '/cartographie', 'defaults' => [ /** @see ApplicationController::cartographieAction() */ 'controller' => ApplicationController::class, 'action' => 'cartographie' ], Loading @@ -138,6 +157,7 @@ return [ 'options' => [ 'route' => '/exporter-cartographie', 'defaults' => [ /** @see ApplicationController::exporterCartographieAction() */ 'controller' => ApplicationController::class, 'action' => 'exporter-cartographie' ], Loading @@ -148,6 +168,7 @@ return [ 'options' => [ 'route' => '/afficher/:id', 'defaults' => [ /** @see ApplicationController::afficherAction() */ 'controller' => ApplicationController::class, 'action' => 'afficher', ], Loading @@ -158,6 +179,7 @@ return [ 'options' => [ 'route' => '/changer-status/:id', 'defaults' => [ /** @see ApplicationController::changerStatusAction() */ 'controller' => ApplicationController::class, 'action' => 'changer-status', ], Loading @@ -168,6 +190,7 @@ return [ 'options' => [ 'route' => '/editer/:id', 'defaults' => [ /** @see ApplicationController::editerAction() */ 'controller' => ApplicationController::class, 'action' => 'editer', ], Loading @@ -178,6 +201,7 @@ return [ 'options' => [ 'route' => '/historiser/:id', 'defaults' => [ /** @see ApplicationController::historiserAction() */ 'controller' => ApplicationController::class, 'action' => 'historiser', ], Loading @@ -188,6 +212,7 @@ return [ 'options' => [ 'route' => '/restaurer/:id', 'defaults' => [ /** @see ApplicationController::restaurerAction() */ 'controller' => ApplicationController::class, 'action' => 'restaurer', ], Loading @@ -198,6 +223,7 @@ return [ 'options' => [ 'route' => '/effacer/:id', 'defaults' => [ /** @see ApplicationController::effacerAction() */ 'controller' => ApplicationController::class, 'action' => 'effacer', ], Loading @@ -208,6 +234,7 @@ return [ 'options' => [ 'route' => '/creer', 'defaults' => [ /** @see ApplicationController::creerAction() */ 'controller' => ApplicationController::class, 'action' => 'creer', ], Loading
module/Element/src/Element/Controller/ApplicationController.php +2 −2 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ class ApplicationController extends AbstractActionController { return $vm; } public function changerStatusAction() public function changerStatusAction() : Response { $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); Loading Loading @@ -239,7 +239,7 @@ class ApplicationController extends AbstractActionController { } $date = (new DateTime())->format('Ymd-His'); $filename="export_utilisateur_".$date.".csv"; $filename="cartographie_application_".$date.".csv"; $CSV = new CsvModel(); $CSV->setDelimiter(';'); $CSV->setEnclosure('"'); Loading
module/Element/src/Element/Controller/ApplicationControllerFactory.php +8 −1 Original line number Diff line number Diff line Loading @@ -13,9 +13,17 @@ use FicheMetier\Service\FicheMetier\FicheMetierService; use Interop\Container\ContainerInterface; use Metier\Service\Domaine\DomaineService; use Metier\Service\Metier\MetierService; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; class ApplicationControllerFactory { /** * @param ContainerInterface $container * @return ApplicationController * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container) : ApplicationController { /** Loading Loading @@ -43,7 +51,6 @@ class ApplicationControllerFactory { $applicationForm = $container->get('FormElementManager')->get(ApplicationForm::class); $applicationElementForm = $container->get('FormElementManager')->get(ApplicationElementForm::class); /** @var ApplicationController $controller */ $controller = new ApplicationController(); $controller->setApplicationService($applicationService); $controller->setApplicationThemeService($applicationGroupeService); Loading
module/Element/src/Element/Form/Application/ApplicationForm.php +2 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,8 @@ class ApplicationForm extends Form { 'type' => Text::class, 'name' => 'libelle', 'options' => [ 'label' => "Libelle :", 'label' => "Libelle <span class='icon icon-obligatoire' title='Champ obligatoire'></span>:", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'libelle', Loading