svg
This commit is contained in:
parent
612012d480
commit
f85b6e848b
|
@ -8,8 +8,8 @@ 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}XzeVqnrNOqCyH0z7F5gEVxBKwivMttoy
|
||||
', 'admin@transnum.cadol.es', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}xiNakN3H44Yrsb6ZrCP+/VGKob+TEyKy
|
||||
', 'afornerot@cadoles.com', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -172,6 +172,8 @@ class RegistrationController extends Controller
|
|||
|
||||
public function submitAction(Request $request)
|
||||
{
|
||||
|
||||
|
||||
$moderegistration = $this->getParameter('moderegistration');
|
||||
$masteridentity = $this->getParameter('masteridentity');
|
||||
if($moderegistration=="none"||$masteridentity!="SQL")
|
||||
|
@ -282,6 +284,8 @@ class RegistrationController extends Controller
|
|||
|
||||
$message = $this->container->get('cadoles.core.service.mail');
|
||||
$message->sendEmail($template, $mail_params, $to, $from, $fromName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// si oui : Domaine de confiance : email de validation d'inscription directement à l'utilisateur
|
||||
|
@ -319,15 +323,11 @@ class RegistrationController extends Controller
|
|||
$em->flush();
|
||||
|
||||
// A voir retour sur un écran d'info indiquant si validation par admion ou s'il doit matter ses email
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => "info"
|
||||
]);
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', "info");
|
||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||
}
|
||||
|
||||
else {
|
||||
return $this->render($this->labelentity.':edit.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
|
@ -336,8 +336,21 @@ class RegistrationController extends Controller
|
|||
'mode' => 'submit',
|
||||
'form' => $form->createView()
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
public function infoAction(Request $request)
|
||||
{
|
||||
$info = $this->get('session')->get('registrationinfo');
|
||||
$mode = $this->get('session')->get('registrationmode');
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => $mode
|
||||
]);
|
||||
}
|
||||
|
||||
public function sendAction($id,Request $request)
|
||||
{
|
||||
|
@ -440,12 +453,18 @@ class RegistrationController extends Controller
|
|||
if(!$data) {
|
||||
$info="Clé de validation invalide";
|
||||
$mode="danger";
|
||||
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', $mode);
|
||||
}
|
||||
else {
|
||||
$url=$this->getParameter('eportail_login');
|
||||
$url=$this->getUrlLogin();
|
||||
$info="<p>Votre compte est à présent activé</p><p>Vous allez être redirigé vers la mire de connexion</p><p><a href='".$url."'>Connexion</a>";
|
||||
$mode="success";
|
||||
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', $mode);
|
||||
|
||||
// Initialisation de l'enregistrement
|
||||
$user = new User();
|
||||
$user->setAvatar("noavatar.png");
|
||||
|
@ -487,14 +506,7 @@ class RegistrationController extends Controller
|
|||
$em->flush();
|
||||
}
|
||||
|
||||
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => $mode
|
||||
]);
|
||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||
}
|
||||
|
||||
|
||||
|
@ -612,14 +624,10 @@ class RegistrationController extends Controller
|
|||
|
||||
// Info
|
||||
$info="Vous allez recevoir un mail avec lien qui vous permettra de réinitialiser votre mot de passe";
|
||||
$mode="success";
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => $mode
|
||||
]);
|
||||
$mode="info";
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', $mode);
|
||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||
}
|
||||
|
||||
// Affichage du formulaire
|
||||
|
@ -654,14 +662,9 @@ class RegistrationController extends Controller
|
|||
if(!$user) {
|
||||
$info="Clé de validation invalide";
|
||||
$mode="danger";
|
||||
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => $mode
|
||||
]);
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', $mode);
|
||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||
}
|
||||
else {
|
||||
// Création du formulaire
|
||||
|
@ -715,18 +718,12 @@ class RegistrationController extends Controller
|
|||
$em->persist($user[0]);
|
||||
$em->flush();
|
||||
|
||||
$info="Nouveau mot de passe prise en compte<br>Vous allez être rediriger vers la mire d'authentification";
|
||||
$url=$this->getUrlLogin();
|
||||
$info="<p>Nouveau mot de passe prise en compte</p><p>Vous allez être redirigé vers la mire de connexion</p><p><a href='".$url."'>Connexion</a>";
|
||||
$mode="success";
|
||||
|
||||
|
||||
return $this->render($this->labelentity.':info.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'info' => $info,
|
||||
'mode' => $mode
|
||||
]);
|
||||
|
||||
$this->get('session')->set('registrationinfo', $info);
|
||||
$this->get('session')->set('registrationmode', $mode);
|
||||
return $this->redirectToRoute('cadoles_core_registration_info');
|
||||
}
|
||||
|
||||
// Affichage du formulaire
|
||||
|
@ -739,6 +736,24 @@ class RegistrationController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
protected function getUrlLogin()
|
||||
{
|
||||
$mode_auth=$this->getParameter("mode_auth");
|
||||
if($mode_auth == "SAML")
|
||||
$url = $this->generateUrl('lightsaml_sp.login');
|
||||
elseif($mode_auth == "CAS")
|
||||
$url = $this->generateUrl('cas_sp.login');
|
||||
elseif($mode_auth == "SQL")
|
||||
$url = $this->generateUrl('cadoles_core_login');
|
||||
elseif($mode_auth == "LDAP")
|
||||
$url = $this->generateUrl('cadoles_core_ldap_login');
|
||||
else
|
||||
$url="";
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
protected function getDatas()
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
|
|
@ -169,6 +169,10 @@ cadoles_core_registration:
|
|||
path: /registration
|
||||
defaults: { _controller: CadolesCoreBundle:Registration:submit }
|
||||
|
||||
cadoles_core_registration_info:
|
||||
path: /registration/info
|
||||
defaults: { _controller: CadolesCoreBundle:Registration:info }
|
||||
|
||||
cadoles_core_registration_validation:
|
||||
path: /registration/validation/{key}
|
||||
defaults: { _controller: CadolesCoreBundle:Registration:validation }
|
||||
|
|
|
@ -16,17 +16,20 @@
|
|||
|
||||
{% if mode=="success" %}
|
||||
$(document).ready(function() {
|
||||
{% if eportail_sync %}
|
||||
// Redirection vers la mire de connexion d'ePortail
|
||||
setTimeout(function(){
|
||||
window.location.href="{{ eportail_login }}";
|
||||
}, 6000);
|
||||
{% else %}
|
||||
// Redirection vers la mire d'authentification
|
||||
setTimeout(function(){
|
||||
{% if mode_auth == "SAML" %}
|
||||
window.location.href="{{ path("lightsaml_sp.login") }}";
|
||||
{% elseif mode_auth == "CAS" %}
|
||||
window.location.href="{{ path("cas_sp.login") }}";
|
||||
{% elseif mode_auth == "SQL" %}
|
||||
window.location.href="{{ path("cadoles_core_login") }}";
|
||||
}, 6000);
|
||||
{% elseif mode_auth == "LDAP" %}
|
||||
window.location.href="{{ path("cadoles_core_ldap_login") }}";
|
||||
{% endif %}
|
||||
|
||||
|
||||
}, 6000);
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -228,11 +228,15 @@ class jsonRPCClient
|
|||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
if (isset($this->httpErrors[$httpCode]))
|
||||
{
|
||||
echo 'Response Http Error - ' . $this->httpErrors[$httpCode];
|
||||
return $false;
|
||||
throw new \RuntimeException('Response Http Error - ' . $this->httpErrors[$httpCode]);
|
||||
}
|
||||
// check for curl error
|
||||
if (0 < curl_errno($ch))
|
||||
{
|
||||
echo 'Unable to connect to '.$this->url . ' Error: ' . curl_error($ch);
|
||||
return $response;
|
||||
throw new \RuntimeException('Unable to connect to '.$this->url . ' Error: ' . curl_error($ch));
|
||||
}
|
||||
// close the connection
|
||||
|
@ -253,6 +257,7 @@ class jsonRPCClient
|
|||
{
|
||||
if ($pFailed)
|
||||
{
|
||||
return false;
|
||||
throw new \RuntimeException($pErrMsg);
|
||||
}
|
||||
}
|
||||
|
@ -397,6 +402,7 @@ class GetLimesurveyCommand extends Command
|
|||
|
||||
// list de l'ensemble des sondages invité
|
||||
$surveys= $myJSONRPCClient->list_surveys($sessionKey);
|
||||
if(is_array($surveys)) {
|
||||
foreach($surveys as $survey) {
|
||||
// Si le sondage est actif
|
||||
if($survey["active"]=="Y") {
|
||||
|
@ -433,9 +439,11 @@ class GetLimesurveyCommand extends Command
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pour chaque user on remonte les sondages dont ils sont propriétaires
|
||||
$userlimesurveys=$myJSONRPCClient->list_users($sessionKey);
|
||||
if(is_array($userlimesurveys)) {
|
||||
foreach($userlimesurveys as $userlimesurvey) {
|
||||
$user = $this->em->getRepository('CadolesCoreBundle:User')->findOneBy(["username"=>$userlimesurvey["users_name"]]);
|
||||
if($user) {
|
||||
|
@ -464,10 +472,13 @@ class GetLimesurveyCommand extends Command
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// On supprime les encours pour le remplacer le new
|
||||
if($fs->exists($this->limefile.'-new')) {
|
||||
$fs->remove($this->limefile);
|
||||
$fs->rename($this->limefile.'-new',$this->limefile);
|
||||
}
|
||||
|
||||
// release the session key
|
||||
$myJSONRPCClient->release_session_key( $sessionKey );
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
> Synchronisation posh-profil à revoir
|
||||
|
||||
> Séparateur milier sur datatable
|
||||
|
||||
> Donner des permissions d'écritures sur les calendriers comme sur le blog
|
||||
> Que faire si lock sur cron depuis trop longtemps
|
||||
|
||||
> Couleur sur blog
|
||||
> Import de compte
|
||||
|
|
Loading…
Reference in New Issue