Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
2c8cc7a987
@ -147,14 +147,6 @@ class SecurityController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
// Calcul Service
|
||||
/*
|
||||
$user = $em->getRepository('CadolesCoreBundle:User')->calculateServices($user, $attributes);
|
||||
|
||||
// Attributs calculés
|
||||
$attributes = $em->getRepository('CadolesCoreBundle:User')->calculateAttributes($user, $attributes);
|
||||
*/
|
||||
|
||||
// Sauvegarde des attributes en session
|
||||
$this->get('session')->set('attributes', $attributes);
|
||||
|
||||
|
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace Cadoles\CoreBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
|
||||
class SondeController extends Controller
|
||||
{
|
||||
public function sondeAction()
|
||||
{
|
||||
// Debug sonde
|
||||
$fgdebug = $this->getParameter("fgdebug");
|
||||
|
||||
// Calcul du login
|
||||
$user=$this->getUser();
|
||||
if($user) $loginsonde=crypt($user->getUsername(),"dkywqZPYNHtWDnSxACjXVcIsFuaiQT");
|
||||
else $loginsonde="";
|
||||
|
||||
// Calcul du profil
|
||||
$profilsonde="visiteur";
|
||||
if($user) {
|
||||
$profilsonde="utilisateur";
|
||||
$attributes=$this->get('session')->get('attributes');
|
||||
if(isset($attributes["ENTPersonProfils"])) $profilsonde=$attributes["ENTPersonProfils"];
|
||||
}
|
||||
|
||||
// Calcul de la provenance
|
||||
$e = explode('.', $_SERVER["REMOTE_ADDR"]);
|
||||
$s = sizeof($e);
|
||||
if(($e[0]=="172"&&$e[1]=="30")||($e[0]=="172"&&$e[1]=="16")||($e[0]=="10"&&($e[1]=="77"||$e[1]=="93"||$e[1]=="94")))
|
||||
$provenancesonde='interne';
|
||||
else
|
||||
$provenancesonde='externe';
|
||||
|
||||
// Calcul du service associé à la page
|
||||
$request = $this->get('request_stack')->getMasterRequest();
|
||||
$usage=$request->query->get('usage');
|
||||
$route = $request->attributes->get('_route');
|
||||
|
||||
if($route=="cadoles_core_user_file_list"||$route=="cadoles_core_home")
|
||||
$usagesonde="nosonde";
|
||||
elseif($route=="cadoles_portal_user_page_view") {
|
||||
if($usage=="group") $usagesonde="collaboratif";
|
||||
elseif($usage=="user") $usagesonde="collaboratif";
|
||||
else $usagesonde="portail";
|
||||
}
|
||||
elseif(stripos($route,"cadoles_portal_user_calendar")!==false)
|
||||
$usagesonde="calendrier";
|
||||
elseif(stripos($route,"cadoles_portal_user_project")!==false)
|
||||
$usagesonde="calendrier";
|
||||
elseif(stripos($route,"cadoles_portal_user_blog")!==false)
|
||||
$usagesonde="collaboratif";
|
||||
elseif(stripos($route,"cadoles_core_user_file")!==false)
|
||||
$usagesonde="fichier";
|
||||
else
|
||||
$usagesonde="portail";
|
||||
|
||||
|
||||
$urlsonde="";
|
||||
if($usagesonde!="nosonde") {
|
||||
$url=$this->getParameter("widsonde_url");
|
||||
$app=$this->getParameter("alias");
|
||||
$urlsonde = $url."?appli=$app&profil=$profilsonde&login=$loginsonde&provenance=$provenancesonde&usage=$usagesonde&route=$route&fgdebug=$fgdebug";
|
||||
}
|
||||
|
||||
return $this->render('CadolesCoreBundle:Sonde:sonde.html.twig',['urlsonde' => $urlsonde]);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -45,6 +45,11 @@ cadoles_core_redirect:
|
||||
path: /user/redirect/{route}/{id}
|
||||
defaults: { _controller: CadolesCoreBundle:Security:redirect }
|
||||
|
||||
#== Sonde ================================================================================================================
|
||||
cadoles_core_sonde:
|
||||
path: /sonde
|
||||
defaults: { _controller: CadolesCoreBundle:Sonde:sonde }
|
||||
|
||||
#== Crop Image ===========================================================================================================
|
||||
cadoles_core_crop01:
|
||||
path: /crop01
|
||||
|
@ -65,7 +65,6 @@
|
||||
widthbody=widthbody-250;
|
||||
if(widthbody<950) widthbody="100%";
|
||||
|
||||
console.log("euhe"+widthbody);
|
||||
//$("#image").css({});
|
||||
$("#image").css("height","auto");
|
||||
$("#image").css("max-width",widthbody);
|
||||
|
@ -0,0 +1,3 @@
|
||||
{% if not urlsonde is empty %}
|
||||
<script src='{{ urlsonde }}'></script>
|
||||
{% endif %}
|
@ -158,8 +158,8 @@
|
||||
{% endblock %}
|
||||
</script>
|
||||
|
||||
{% if activate_widsonde %}
|
||||
<script src='{{ widsonde_url }}?appli=Ninegate'></script>
|
||||
{% if activate_widsonde and not framed is defined %}
|
||||
{{ render(path("cadoles_core_sonde")) }}
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
|
@ -6,4 +6,6 @@ lastname=sn
|
||||
email=mail
|
||||
user_groups=user_groups
|
||||
rne=rne
|
||||
ENTPersonProfils=ENTPersonProfils
|
||||
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
# This file is auto-generated during the composer install
|
||||
parameters:
|
||||
# Certaines trace seront visible via un passage à true de fgdebug
|
||||
fgdebug: false
|
||||
|
||||
# Determine qui est le maitre de l'identitité = SQL / LDAP / SSO
|
||||
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
|
||||
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
|
||||
|
Loading…
Reference in New Issue
Block a user