Commit 20c40f07 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction d'appels au service UserContext dont le getter a été supprimé

parent 7e0a09cd
Loading
Loading
Loading
Loading
+2 −2
Changes for module/Application/config/aaa_module.config.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -183,8 +183,8 @@ $config = [
        ],
    ],
    'controllers'        => [
        'invokables' => [
            'Application\Controller\Index' => Controller\IndexController::class,
        'factories' => [
            'Application\Controller\Index' => Controller\Factory\IndexControllerFactory::class,
        ],
    ],
    'controller_plugins' => [
+1 −1
Changes for module/Application/src/Application/Controller/DossierController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ class DossierController extends AbstractController
                // Lorsqu'un intervenant modifie son dossier, le rôle à sélectionner à la prochine requête doit correspondre
                // au statut choisi dans le dossier.
                if ($role->getIntervenant()) {
                    $this->serviceUserContext()->setNextSelectedIdentityRole($dossier->getStatut()->getRoleId());
                    $this->serviceUserContext->setNextSelectedIdentityRole($dossier->getStatut()->getRoleId());
                }

                if (!$lastDossierId && $role->getIntervenant()) { // on ne redirige que pour l'intervenant et seulement si le dossier a été nouvellement créé
+6
Changes for module/Application/src/Application/Controller/Factory/DossierControllerFactory.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Application\Controller\Factory;

use Application\Controller\DossierController;
use Interop\Container\ContainerInterface;
use UnicaenAuth\Service\UserContext;

class DossierControllerFactory
{
@@ -18,6 +19,11 @@ class DossierControllerFactory
    {
        $controller = new DossierController();

        /** @var UserContext $userContextService */
        $userContextService = $container->get(UserContext::class);

        $controller->setServiceUserContext($userContextService);

        return $controller;
    }

+30
Changes for module/Application/src/Application/Controller/Factory/IndexControllerFactory.php: 30 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application\Controller\Factory;

use Application\Controller\IndexController;
use Interop\Container\ContainerInterface;
use UnicaenAuth\Service\UserContext;

class IndexControllerFactory
{
    /**
     * Create controller
     *
     * @param ContainerInterface $container
     *
     * @return IndexController
     */
    public function __invoke(ContainerInterface $container, $requestedName, $options = null)
    {
        $controller = new IndexController();

        /** @var UserContext $userContextService */
        $userContextService = $container->get(UserContext::class);

        $controller->setServiceUserContext($userContextService);

        return $controller;
    }

}
 No newline at end of file
+1 −1
Changes for module/Application/src/Application/Controller/Factory/UtilisateurControllerFactory.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class UtilisateurControllerFactory
        $shibService = $container->get(ShibService::class);

        /** @var UserContext $userContextService */
        $userContextService = $container->get('AuthUserContext');
        $userContextService = $container->get(UserContext::class);

        /** @var LdapPeopleMapper $mapper */
        $ldapPeopleMapper = $container->get('ldap_people_mapper');
Loading