Loading module/Agrement/config/module.config.php +54 −39 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ return [ 'route' => '/:intervenant/agrement', 'controller' => AgrementController::class, 'action' => 'index', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, 'may_terminate' => true, 'child_routes' => [ 'conseil-academique' => [ Loading @@ -34,6 +39,11 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'conseil-restreint' => [ 'route' => '/conseil-restreint', Loading @@ -41,6 +51,11 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'ajouter' => [ 'route' => '/:typeAgrement/ajouter[/:structure]', Loading @@ -49,6 +64,13 @@ return [ 'structure' => '[0-9]*', ], 'action' => 'saisir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'voir' => [ 'route' => '/voir/:agrement', Loading @@ -56,6 +78,11 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'voir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'saisir' => [ 'route' => '/saisir/[:agrement]', Loading @@ -63,6 +90,13 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'saisir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'supprimer' => [ 'route' => '/supprimer/[:agrement]', Loading @@ -70,6 +104,11 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'supprimer', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, ], 'assertion' => AgrementAssertion::class, ], ], ], Loading @@ -89,6 +128,13 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'conseil-restreint' => [ 'route' => '/conseil-restreint', Loading @@ -96,10 +142,18 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'export-csv' => [ 'route' => '/export-csv', 'action' => 'export-csv', 'privileges' => Privileges::AGREMENT_EXPORT_CSV, ], ], ], Loading Loading @@ -160,45 +214,6 @@ return [ ], 'guards' => [ [ 'controller' => AgrementController::class, 'action' => ['index', 'lister', 'voir'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], [ 'controller' => AgrementController::class, 'action' => ['ajouter', 'saisir-lot', 'saisir'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], [ 'controller' => AgrementController::class, 'action' => ['export-csv'], 'privileges' => [ Privileges::AGREMENT_EXPORT_CSV, ], ], [ 'controller' => AgrementController::class, 'action' => ['supprimer'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, ], 'assertion' => AgrementAssertion::class, ], ], 'rules' => [ [ 'privileges' => [ Loading module/Agrement/src/Assertion/AgrementAssertion.php +2 −6 Original line number Diff line number Diff line Loading @@ -31,10 +31,6 @@ class AgrementAssertion extends AbstractAssertion protected function assertEntity(?ResourceInterface $entity = null, $privilege = null): bool { // pareil si le rôle ne possède pas le privilège adéquat if ($privilege && !$this->authorize->isAllowedPrivilege($privilege)) return false; // Si c'est bon alors on affine... switch (true) { case $entity instanceof TblAgrement: switch ($privilege) { Loading Loading @@ -76,9 +72,9 @@ class AgrementAssertion extends AbstractAssertion protected function assertController(string $controller, ?string $action): bool { /* @var $intervenant Intervenant */ $intervenant = $this->getParam('intervenant'); $intervenant = $this->getParam(Intervenant::class); $typeAgrement = $this->getParam('typeAgrement'); $typeAgrement = $this->getParam(TypeAgrement::class); if (!$typeAgrement){ $typeAgrementCode = $this->getParam('typeAgrementCode'); if ($typeAgrementCode) { Loading module/Application/config/aaa_module.config.php +1 −5 Original line number Diff line number Diff line Loading @@ -138,11 +138,7 @@ $config = [ Controller\IndexController::class => Controller\Factory\IndexControllerFactory::class, ], ], 'controller_plugins' => [ 'factories' => [ 'context' => Controller\Plugin\ContextFactory::class, ], ], 'view_manager' => [ 'template_path_stack' => [ __DIR__ . '/../view', Loading module/Application/config/periode.config.php +1 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,7 @@ namespace Application; use Application\Provider\Privileges; use Application\Service\PeriodeService; return [ 'router' => [ Loading @@ -18,6 +16,7 @@ return [ 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ 'saisie' => [ Loading Loading @@ -86,7 +85,6 @@ return [ ], ], 'guards' => [ [ 'controller' => Controller\PeriodeController::class, Loading @@ -100,17 +98,11 @@ return [ ], ], 'controllers' => [ 'factories' => [ Controller\PeriodeController::class => Controller\Factory\PeriodeControllerFactory::class, ], ], 'service_manager' => [ 'invokables' => [ PeriodeService::class => PeriodeService::class, ], ], 'form_elements' => [ 'factories' => [ Loading module/Application/src/Controller/IndexController.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Controller; use Administration\Service\ParametresServiceAwareTrait; use Application\Entity\Db\Annee; use Application\Provider\Privileges; use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; Loading Loading @@ -66,7 +67,7 @@ class IndexController extends AbstractController public function changementAnneeAction() { /* Prise en compte du changement d'année!! */ $annee = $this->params()->fromRoute('annee'); $annee = $this->params()->fromRoute(Annee::class); if ($annee) { $annee = $this->getServiceAnnee()->get($annee); $this->getServiceContext()->setAnnee($annee); Loading Loading
module/Agrement/config/module.config.php +54 −39 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ return [ 'route' => '/:intervenant/agrement', 'controller' => AgrementController::class, 'action' => 'index', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, 'may_terminate' => true, 'child_routes' => [ 'conseil-academique' => [ Loading @@ -34,6 +39,11 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'conseil-restreint' => [ 'route' => '/conseil-restreint', Loading @@ -41,6 +51,11 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'ajouter' => [ 'route' => '/:typeAgrement/ajouter[/:structure]', Loading @@ -49,6 +64,13 @@ return [ 'structure' => '[0-9]*', ], 'action' => 'saisir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'voir' => [ 'route' => '/voir/:agrement', Loading @@ -56,6 +78,11 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'voir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], 'saisir' => [ 'route' => '/saisir/[:agrement]', Loading @@ -63,6 +90,13 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'saisir', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'supprimer' => [ 'route' => '/supprimer/[:agrement]', Loading @@ -70,6 +104,11 @@ return [ 'agrement' => '[0-9]*', ], 'action' => 'supprimer', 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, ], 'assertion' => AgrementAssertion::class, ], ], ], Loading @@ -89,6 +128,13 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'conseil-restreint' => [ 'route' => '/conseil-restreint', Loading @@ -96,10 +142,18 @@ return [ 'defaults' => [ 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], 'export-csv' => [ 'route' => '/export-csv', 'action' => 'export-csv', 'privileges' => Privileges::AGREMENT_EXPORT_CSV, ], ], ], Loading Loading @@ -160,45 +214,6 @@ return [ ], 'guards' => [ [ 'controller' => AgrementController::class, 'action' => ['index', 'lister', 'voir'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, ], 'assertion' => AgrementAssertion::class, ], [ 'controller' => AgrementController::class, 'action' => ['ajouter', 'saisir-lot', 'saisir'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_VISUALISATION, Privileges::AGREMENT_CONSEIL_RESTREINT_VISUALISATION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, ], 'assertion' => AgrementAssertion::class, ], [ 'controller' => AgrementController::class, 'action' => ['export-csv'], 'privileges' => [ Privileges::AGREMENT_EXPORT_CSV, ], ], [ 'controller' => AgrementController::class, 'action' => ['supprimer'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, ], 'assertion' => AgrementAssertion::class, ], ], 'rules' => [ [ 'privileges' => [ Loading
module/Agrement/src/Assertion/AgrementAssertion.php +2 −6 Original line number Diff line number Diff line Loading @@ -31,10 +31,6 @@ class AgrementAssertion extends AbstractAssertion protected function assertEntity(?ResourceInterface $entity = null, $privilege = null): bool { // pareil si le rôle ne possède pas le privilège adéquat if ($privilege && !$this->authorize->isAllowedPrivilege($privilege)) return false; // Si c'est bon alors on affine... switch (true) { case $entity instanceof TblAgrement: switch ($privilege) { Loading Loading @@ -76,9 +72,9 @@ class AgrementAssertion extends AbstractAssertion protected function assertController(string $controller, ?string $action): bool { /* @var $intervenant Intervenant */ $intervenant = $this->getParam('intervenant'); $intervenant = $this->getParam(Intervenant::class); $typeAgrement = $this->getParam('typeAgrement'); $typeAgrement = $this->getParam(TypeAgrement::class); if (!$typeAgrement){ $typeAgrementCode = $this->getParam('typeAgrementCode'); if ($typeAgrementCode) { Loading
module/Application/config/aaa_module.config.php +1 −5 Original line number Diff line number Diff line Loading @@ -138,11 +138,7 @@ $config = [ Controller\IndexController::class => Controller\Factory\IndexControllerFactory::class, ], ], 'controller_plugins' => [ 'factories' => [ 'context' => Controller\Plugin\ContextFactory::class, ], ], 'view_manager' => [ 'template_path_stack' => [ __DIR__ . '/../view', Loading
module/Application/config/periode.config.php +1 −9 Original line number Diff line number Diff line Loading @@ -2,9 +2,7 @@ namespace Application; use Application\Provider\Privileges; use Application\Service\PeriodeService; return [ 'router' => [ Loading @@ -18,6 +16,7 @@ return [ 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ 'saisie' => [ Loading Loading @@ -86,7 +85,6 @@ return [ ], ], 'guards' => [ [ 'controller' => Controller\PeriodeController::class, Loading @@ -100,17 +98,11 @@ return [ ], ], 'controllers' => [ 'factories' => [ Controller\PeriodeController::class => Controller\Factory\PeriodeControllerFactory::class, ], ], 'service_manager' => [ 'invokables' => [ PeriodeService::class => PeriodeService::class, ], ], 'form_elements' => [ 'factories' => [ Loading
module/Application/src/Controller/IndexController.php +2 −1 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Controller; use Administration\Service\ParametresServiceAwareTrait; use Application\Entity\Db\Annee; use Application\Provider\Privileges; use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; Loading Loading @@ -66,7 +67,7 @@ class IndexController extends AbstractController public function changementAnneeAction() { /* Prise en compte du changement d'année!! */ $annee = $this->params()->fromRoute('annee'); $annee = $this->params()->fromRoute(Annee::class); if ($annee) { $annee = $this->getServiceAnnee()->get($annee); $this->getServiceContext()->setAnnee($annee); Loading