From d4bc3dadd44f7f35c0698230fd71ff604b9832ab Mon Sep 17 00:00:00 2001 From: afornerot Date: Fri, 23 Oct 2020 15:11:06 +0200 Subject: [PATCH] refonte sonde --- src/nineskeletor-1.0/config/routes.yaml | 6 +++++ .../src/Controller/SecurityController.php | 22 +++++-------------- src/nineskeletor-1.0/templates/base.html.twig | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/nineskeletor-1.0/config/routes.yaml b/src/nineskeletor-1.0/config/routes.yaml index f84d070..18db32b 100644 --- a/src/nineskeletor-1.0/config/routes.yaml +++ b/src/nineskeletor-1.0/config/routes.yaml @@ -29,6 +29,12 @@ app_logoutcas: defaults: { _controller: App\Controller\SecurityController:logout } +#== Sonde ================================================================================================================ +app_sonde: + path: /sonde + defaults: { _controller: App\Controller\SondeController:sonde } + + #== Crop ========================================================================================================= app_crop01: path: /user/crop01 diff --git a/src/nineskeletor-1.0/src/Controller/SecurityController.php b/src/nineskeletor-1.0/src/Controller/SecurityController.php index 856a5f5..09047ac 100755 --- a/src/nineskeletor-1.0/src/Controller/SecurityController.php +++ b/src/nineskeletor-1.0/src/Controller/SecurityController.php @@ -1,5 +1,4 @@ get('session')->get("_security.main.target_path"); @@ -70,14 +63,7 @@ class SecurityController extends AbstractController $username = \phpCAS::getUser(); // Récupération Attribut - $attributes = \phpCAS::getAttributes(); - - // Suppression des Attributs en tableaux - foreach ($attributes as $key => $value) { - if(is_array($value)) - unset($attributes[$key]); - } - + $attributes = \phpCAS::getAttributes(); // Rechercher l'utilisateur $em = $this->getDoctrine()->getManager(); @@ -119,6 +105,10 @@ class SecurityController extends AbstractController $em->flush(); } + // Sauvegarde des attributes en session + $this->get('session')->set('attributes', $attributes); + + // Mise à jour par rapport au maitre de l'identité $masteridentity=$this->getParameter("appMasteridentity"); if($masteridentity=="Ninegate") { $this->updateNinegate($user); diff --git a/src/nineskeletor-1.0/templates/base.html.twig b/src/nineskeletor-1.0/templates/base.html.twig index 1304647..3d7a4f3 100644 --- a/src/nineskeletor-1.0/templates/base.html.twig +++ b/src/nineskeletor-1.0/templates/base.html.twig @@ -132,7 +132,7 @@ {% if sondeUse %} - + {{ render(path("app_sonde")) }} {% endif %}