diff --git a/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php b/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
index 1a3975d2..664fc84e 100644
--- a/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
+++ b/src/ninegate-1.0/src/Cadoles/CASBundle/Controller/SecurityController.php
@@ -21,6 +21,9 @@ class SecurityController extends Controller
public function loginAction(Request $request)
{
+ // Récupération de la cible de navigation
+ $redirect = $request->get("redirect");
+
// Masteridentity
$masteridentity=$this->getParameter("masteridentity");
@@ -153,8 +156,10 @@ class SecurityController extends Controller
$dispatcher = new EventDispatcher();
$dispatcher->dispatch("security.interactive_login", $event);
-
- return $this->redirect($this->generateUrl('cadoles_core_home'));
+ if($redirect)
+ return $this->redirect($redirect);
+ else
+ return $this->redirect($this->generateUrl('cadoles_core_home'));
}
public function logoutAction() {
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
index 63bad02c..bc34e46c 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
@@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
-(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}S0E51VgU0ZRXsD5jEdnUDeBkwBRO+29r
+(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}lRLCD0OyEfitEztLVCVC4rLPUnTjIDuY
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php
index ce6ed4ea..9af8f737 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php
@@ -10,6 +10,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Form\FormError;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
+use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Cadoles\CoreBundle\Entity\Group;
use Cadoles\CoreBundle\Entity\Usergroup;
@@ -524,11 +525,15 @@ class GroupController extends Controller
// Notification mail auprès de la personne inscrite
if($group->getFgcanshare()) {
- $text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel();
+ $idpage =$group->getPages()->first()->getId();
+ $url = $this->generateUrl('cadoles_core_home', ["id"=>$idpage], UrlGeneratorInterface::ABSOLUTE_URL);
+ $texthtml="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."
Suivez le lien suivant pour y accéder = $url";
+ $text="Vous venez d'être inscrit dans le groupe de travail : ".$group->getLabel()."
Suivez le lien suivant pour y accéder = $url";
+
$template="template";
$mail_params=array(
"subject" => $this->get('session')->get('appname')." : Inscription au groupe de travail : ".$group->getLabel()."\n\n".$group->getDescription(),
- "body_html"=>nl2br($text),
+ "body_html"=>$texthtml,
"body_text"=>$text
);
$to = $user->getEmail();
@@ -987,6 +992,7 @@ class GroupController extends Controller
}
}
+
protected function getDatas()
{
$em = $this->getDoctrine()->getManager();
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php
index f603eef3..d630e4e4 100755
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/RegistrationController.php
@@ -287,7 +287,6 @@ class RegistrationController extends Controller
}
$url = $this->generateUrl('cadoles_core_config_registration', '', UrlGeneratorInterface::ABSOLUTE_URL);
- $text=
$mail_params=array(
"subject" => $appname." : Inscription à valider",
"body_html"=>"Un utilisateur dont le mail n’est pas en liste blanche souhaite s’inscrire au ".$appname.".\nMerci d’approuver son inscription pour finaliser celle-ci.
Veuillez vérifier cette inscription à cette adresse:
$url",
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Core/reconnect.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Core/reconnect.html.twig
index 584bca1b..35e3b377 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Core/reconnect.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Core/reconnect.html.twig
@@ -51,10 +51,21 @@
{% endblock %}
{% block localjavascript %}
+
$('document').ready(function(){
setTimeout(function(){
//parent.location.reload();
- parent.location.href = "{{ path("cadoles_core_home") }}";
+ {% if redirectto is defined %}
+ console.log("{{ redirectto }}");
+ console.log("{{ mode_auth }}");
+ {% if mode_auth == "CAS" %}
+ parent.location.href = "{{ path("cas_sp.login", {redirect:redirectto}) }}";
+ {% else %}
+ parent.location.href = "{{ path("cadoles_core_home") }}";
+ {% endif %}
+ {% else %}
+ //parent.location.href = "{{ path("cadoles_core_home") }}";
+ {% endif %}
}, 2000);
});
{% endblock %}
diff --git a/src/ninegate-1.0/src/Cadoles/SAMLBundle/Controller/DefaultController.php b/src/ninegate-1.0/src/Cadoles/SAMLBundle/Controller/DefaultController.php
index 51489894..24d2f6ee 100644
--- a/src/ninegate-1.0/src/Cadoles/SAMLBundle/Controller/DefaultController.php
+++ b/src/ninegate-1.0/src/Cadoles/SAMLBundle/Controller/DefaultController.php
@@ -21,7 +21,8 @@ class DefaultController extends BaseController
return $this->render('CadolesCoreBundle:Core:reconnect.html.twig', [
'useheader' => true,
'usemenu' => false,
- 'usesidebar' => false,
+ 'usesidebar' => false,
+ 'redirectto' => $this->get('session')->get("_security.main.target_path")
]);
}
@@ -45,6 +46,7 @@ class DefaultController extends BaseController
public function loginAction(Request $request)
{
$idpEntityId = $request->get('idp');
+
if (null === $idpEntityId) {
return $this->redirect($this->generateUrl($this->container->getParameter('lightsaml_sp.route.discovery')));
}