Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ composer.lock vendor !/public/vendor /public/css/local.css /public/css/logos.css module/Application/config/merged/agent.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ return [ 'rechercher-gestionnaire', ], 'privileges' => [ AgentPrivileges::AGENT_AFFICHER, AgentPrivileges::AGENT_RECHERCHER, ], ], [ Loading module/Application/src/Application/Provider/Privilege/AgentPrivileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ class AgentPrivileges extends Privileges const AGENT_AJOUTER = 'agent-agent_ajouter'; const AGENT_EDITER = 'agent-agent_editer'; const AGENT_EFFACER = 'agent-agent_effacer'; const AGENT_RECHERCHER = 'agent-agent_rechercher'; const AGENT_ELEMENT_VOIR = 'agent-agent_element_voir'; const AGENT_ELEMENT_AJOUTER = 'agent-agent_element_ajouter'; Loading module/Carriere/config/merged/corps.config.php +13 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ return [ 'controller' => CorpsController::class, 'action' => [ 'modifier-niveaux', 'toggle-superieur-autorite', ], 'privileges' => [ CorpsPrivileges::CORPS_MODIFIER, Loading Loading @@ -104,6 +105,18 @@ return [ ], 'may_terminate' => true, ], 'toggle-superieur-autorite' => [ 'type' => Segment::class, 'options' => [ 'route' => '/toggle-superieur-autorite/:corps', 'defaults' => [ /** @see CorpsController::toggleSuperieurAutoriteAction() */ 'controller' => CorpsController::class, 'action' => 'toggle-superieur-autorite', ], ], 'may_terminate' => true, ], ], ], ], Loading module/Carriere/src/Carriere/Controller/CorpsController.php +10 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Carriere\Provider\Parametre\CarriereParametres; use Carriere\Service\Categorie\CategorieServiceAwareTrait; use Carriere\Service\Corps\CorpsServiceAwareTrait; use Carriere\Service\NiveauEnveloppe\NiveauEnveloppeServiceAwareTrait; use Laminas\Http\Response; use UnicaenParametre\Service\Parametre\ParametreServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; Loading Loading @@ -87,4 +88,13 @@ class CorpsController extends AbstractActionController { $vm->setTemplate('default/default-form'); return $vm; } public function toggleSuperieurAutoriteAction(): Response { $corps = $this->getCorpsService()->getRequestedCorps($this); $corps->setSuperieurAsAutorite(!$corps->isSuperieurAsAutorite()); $this->getCorpsService()->update($corps); return $this->redirect()->toRoute('corps', [], [],true); } } No newline at end of file Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ composer.lock vendor !/public/vendor /public/css/local.css /public/css/logos.css
module/Application/config/merged/agent.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ return [ 'rechercher-gestionnaire', ], 'privileges' => [ AgentPrivileges::AGENT_AFFICHER, AgentPrivileges::AGENT_RECHERCHER, ], ], [ Loading
module/Application/src/Application/Provider/Privilege/AgentPrivileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ class AgentPrivileges extends Privileges const AGENT_AJOUTER = 'agent-agent_ajouter'; const AGENT_EDITER = 'agent-agent_editer'; const AGENT_EFFACER = 'agent-agent_effacer'; const AGENT_RECHERCHER = 'agent-agent_rechercher'; const AGENT_ELEMENT_VOIR = 'agent-agent_element_voir'; const AGENT_ELEMENT_AJOUTER = 'agent-agent_element_ajouter'; Loading
module/Carriere/config/merged/corps.config.php +13 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ return [ 'controller' => CorpsController::class, 'action' => [ 'modifier-niveaux', 'toggle-superieur-autorite', ], 'privileges' => [ CorpsPrivileges::CORPS_MODIFIER, Loading Loading @@ -104,6 +105,18 @@ return [ ], 'may_terminate' => true, ], 'toggle-superieur-autorite' => [ 'type' => Segment::class, 'options' => [ 'route' => '/toggle-superieur-autorite/:corps', 'defaults' => [ /** @see CorpsController::toggleSuperieurAutoriteAction() */ 'controller' => CorpsController::class, 'action' => 'toggle-superieur-autorite', ], ], 'may_terminate' => true, ], ], ], ], Loading
module/Carriere/src/Carriere/Controller/CorpsController.php +10 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Carriere\Provider\Parametre\CarriereParametres; use Carriere\Service\Categorie\CategorieServiceAwareTrait; use Carriere\Service\Corps\CorpsServiceAwareTrait; use Carriere\Service\NiveauEnveloppe\NiveauEnveloppeServiceAwareTrait; use Laminas\Http\Response; use UnicaenParametre\Service\Parametre\ParametreServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; Loading Loading @@ -87,4 +88,13 @@ class CorpsController extends AbstractActionController { $vm->setTemplate('default/default-form'); return $vm; } public function toggleSuperieurAutoriteAction(): Response { $corps = $this->getCorpsService()->getRequestedCorps($this); $corps->setSuperieurAsAutorite(!$corps->isSuperieurAsAutorite()); $this->getCorpsService()->update($corps); return $this->redirect()->toRoute('corps', [], [],true); } } No newline at end of file