Compare commits

..

7 Commits

18 changed files with 315 additions and 30 deletions

View File

@ -45,7 +45,6 @@
<variable name="activer_eoe" type="oui/non" description="Activer EOE" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_eop" type="oui/non" description="Activer EOP" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_etherhome" type="oui/non" description="Activer Etherhome" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_etherhome" type="oui/non" description="Activer Etherhome" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_fluxbb" type="oui/non" description="Activer Fluxbb" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_genconfig" type="oui/non" description="Activer Genconfig" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_gepi" type="oui/non" description="Activer GEPI" hidden='True' exists='False'><value>non</value></variable>
@ -57,8 +56,11 @@
<variable name="activer_moodle" type="oui/non" description="Activer Moodle" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_nextcloud" type="oui/non" description="Activer Nextcloud" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_nineboard" type="oui/non" description="Activer Nineboard" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_nineschool" type="oui/non" description="Activer Nineschool" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_ninesurvey" type="oui/non" description="Activer Ninesurvey" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_opensondage" type="oui/non" description="Activer Opensondage" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_phpldapadmin" type="oui/non" description="Activer phpLdapAdmin" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_piwigo" type="oui/non" description="Activer Piwigo" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_piwik" type="oui/non" description="Activer Piwik" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_roundcube" type="oui/non" description="Activer Roundcube" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_sacoche" type="oui/non" description="Activer Sacoche" hidden='True' exists='False'><value>non</value></variable>
@ -100,6 +102,7 @@
<variable type='string' name='ninegate_openldapsubbranchuser' description="Rechercher les utilisateurs dans la sous-branche" mandatory='False' />
<variable type='string' name='ninegate_ldaptype' description="Annuaire Cadoles LDAP ou AD " mandatory='True'><value>LDAP</value></variable>
<variable type='string' name='ninegate_addomaine' description="Nom de votre domaine AD" mandatory='True'><value></value></variable>
<variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value></value></variable>
<variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value></value></variable>
<variable type='string' name='ninegate_niveau01branche' description="Nom de la branche de Niveau 01 (idem valeur Cadoles ldap)" mandatory='True'><value>niveau01</value></variable>
@ -299,6 +302,18 @@
</variable>
<variable type='string' name='ninegate_widnineboard_url' description='URL complète de votre Nineboard' mandatory='True' />
<!-- NINESCHOOL -->
<variable type="oui/non" name='ninegate_activate_widnineschool' description='Activer Nineschool' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widnineschool_url' description='URL complète de votre Nineschool' mandatory='True' />
<!-- NINESURVEY -->
<variable type="oui/non" name='ninegate_activate_widninesurvey' description='Activer Ninesurvey' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widninesurvey_url' description='URL complète de votre Ninesurvey' mandatory='True' />
<!-- ONLY OFFICE -->
<variable type="oui/non" name='ninegate_activate_widonlyoffice' description='Activer OnlyOffice' mandatory='True'>
<value>non</value>
@ -322,6 +337,12 @@
</variable>
<variable type='string' name='ninegate_widphpldapadmin_url' description='URL complète de votre phpLdapAdmin' mandatory='True' />
<!-- PIWIGO -->
<variable type="oui/non" name='ninegate_activate_widpiwigo' description='Activer Piwigo' mandatory='True'>
<value>non</value>
</variable>
<variable type='string' name='ninegate_widpiwigo_url' description='URL complète de votre Piwigo' mandatory='True' />
<!-- PIWIK -->
<variable type="oui/non" name='ninegate_activate_widpiwik' description='Activer Piwik' mandatory='True'>
<value>non</value>
@ -408,9 +429,12 @@
<separator name="ninegate_activate_widmoodle">Paramètres associés à Moodle</separator>
<separator name="ninegate_activate_widnextcloud">Paramètres associés à Nextcloud</separator>
<separator name="ninegate_activate_widnineboard">Paramètres associés à Nineboard</separator>
<separator name="ninegate_activate_widnineschool">Paramètres associés à Nineschool</separator>
<separator name="ninegate_activate_widninesurvey">Paramètres associés à Ninesurvey</separator>
<separator name="ninegate_activate_widonlyoffice">Paramètres associés à Only Office</separator>
<separator name="ninegate_activate_widopensondage">Paramètres associés à Opensondage</separator>
<separator name="ninegate_activate_widphpldapadmin">Paramètres associés à phpLdapAdmin</separator>
<separator name="ninegate_activate_widpiwigo">Paramètres associés à Piwigo</separator>
<separator name="ninegate_activate_widpiwik">Paramètres associés à Piwik</separator>
<separator name="ninegate_activate_widroundcube">Paramètres associés à Roundcube</separator>
<separator name="ninegate_activate_widsacoche">Paramètres associés à Sacoche</separator>
@ -666,6 +690,13 @@
<target type='variable'>ninegate_openldapreqgroup</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODE SCRIBE -->
<condition name='hidden_if_not_in' source='ninegate_ldaptype'>
<param>AD</param>
<target type='variable'>ninegate_addomaine</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODULE PORTAL -->
<condition name='hidden_if_in' source='ninegate_activate_portal'>
<param>non</param>
@ -689,9 +720,12 @@
<target type='variable'>ninegate_activate_widmoodle</target>
<target type='variable'>ninegate_activate_widnextcloud</target>
<target type='variable'>ninegate_activate_widnineboard</target>
<target type='variable'>ninegate_activate_widnineschool</target>
<target type='variable'>ninegate_activate_widninesurvey</target>
<target type='variable'>ninegate_activate_widonlyoffice</target>
<target type='variable'>ninegate_activate_widopensondage</target>
<target type='variable'>ninegate_activate_widphpldapadmin</target>
<target type='variable'>ninegate_activate_widpiwigo</target>
<target type='variable'>ninegate_activate_widpiwik</target>
<target type='variable'>ninegate_activate_widroundcube</target>
<target type='variable'>ninegate_activate_widsacoche</target>
@ -1276,6 +1310,57 @@
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET NINESCHOOL -->
<fill name='calc_multi_condition' target='ninegate_activate_widnineschool'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_nineschool</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widnineschool'>
<param>non</param>
<target type='variable'>ninegate_widnineschool_url</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widnineschool_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_nineschool</param>
<param name='match'>/nineschool</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET NINESURVEY -->
<fill name='calc_multi_condition' target='ninegate_activate_widninesurvey'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_ninesurvey</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widninesurvey'>
<param>non</param>
<target type='variable'>ninegate_widninesurvey_url</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widninesurvey_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_ninesurvey</param>
<param name='match'>/ninesurvey</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET OPENSONDAGE -->
<fill name='calc_multi_condition' target='ninegate_activate_widopensondage'>
@ -1342,6 +1427,32 @@
<param name='match'>/phpldapadmin</param>
<param name='default_mismatch'>None</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU WIDGET PIWIGO -->
<fill name='calc_multi_condition' target='ninegate_activate_widpiwigo'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_piwigo</param>
<param name='match'>oui</param>
<param name='mismatch'>non</param>
<param name='default_mismatch'>non</param>
</fill>
<condition name='hidden_if_in' source='ninegate_activate_widpiwigo'>
<param>non</param>
<target type='variable'>ninegate_widpiwigo_url</target>
</condition>
<fill name='calc_multi_condition' target='ninegate_widpiwigo_url'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>activer_piwigo</param>
<param name='match'>/piwigo</param>
<param name='default_mismatch'>None</param>
</fill>

View File

@ -43,6 +43,12 @@ class SecurityController extends Controller
// Récupération Attribut
$attributes = \phpCAS::getAttributes();
// Init
$username = "";
$email = "";
$lastname = "";
$firstname = "";
// Rechercher l'utilisateur
$em = $this->getDoctrine()->getManager();
if(isset($attributes[$this->getParameter('user_attr_cas_username')]))
@ -57,7 +63,9 @@ class SecurityController extends Controller
if(isset($attributes[$this->getParameter('user_attr_cas_firstname')]))
$firstname = $attributes[$this->getParameter('user_attr_cas_firstname')];
// Cas nomail
if(empty($email)) $email = $username."@nomail.com";
$user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username));
$exists = $user ? true : false;

View File

@ -236,9 +236,8 @@ class SynchroCommand extends Command
if(!isset($result[$ldap_lastname])) $result[$ldap_lastname] = "";
if(!isset($result[$ldap_firstname])) $result[$ldap_firstname] = "";
if(!array_key_exists($ldap_email,$result)) {
$this->writelnred(" - Création dans Bundle impossible >> ".$result[$ldap_username]." sans email");
continue;
if(!array_key_exists($ldap_email,$result)||empty($result[$ldap_email])) {
$result[$ldap_email]=$result[$ldap_username]."@nomail.fr";
}
$result[$ldap_email]=strtolower($result[$ldap_email]);
$result[$ldap_email]=utf8_encode($result[$ldap_email]);

View File

@ -614,7 +614,7 @@ class RegistrationController extends Controller
{
$moderegistration = $this->getParameter('moderegistration');
$masteridentity = $this->getParameter('masteridentity');
if($moderegistration=="none"||$masteridentity!="SQL")
if($masteridentity!="SQL")
throw $this->createNotFoundException('Permission denied');
// Création du formulaire

View File

@ -6,8 +6,8 @@ use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Cadoles\CoreBundle\Validator as CadolesCoreAssert;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
* @ORM\Entity
@ -51,6 +51,11 @@ class Registration implements UserInterface, \Serializable
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @CadolesCoreAssert\Password()
*/
private $passwordplain;
/**
* @ORM\Column(type="string", length=250)
@ -184,7 +189,10 @@ class Registration implements UserInterface, \Serializable
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
if($password!=$this->password&&$password!=""){
// Placer le password non encodé dans une variable tempo sur laquel on va appliquer la contraite
$this->passwordplain = $password;
// Password encrypté format openldap
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());

View File

@ -6,8 +6,10 @@ use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Cadoles\CoreBundle\Validator as CadolesCoreAssert;
use Symfony\Component\Validator\Constraints as Assert;
use Cadoles\CoreBundle\Validator\Password;
/**
@ -29,6 +31,12 @@ class User implements UserInterface, \Serializable
/**
* @ORM\Column(type="string", length=50, unique=true)
* @Assert\Length(
* min = "5",
* max = "25",
* minMessage = "Votre nom doit faire au moins {{ limit }} caractères",
* maxMessage = "Votre nom ne peut pas être plus long que {{ limit }} caractères"
* )
*/
private $username;
@ -46,6 +54,11 @@ class User implements UserInterface, \Serializable
* @ORM\Column(type="string", length=250)
*/
private $password;
/**
* @CadolesCoreAssert\Password()
*/
private $passwordplain;
/**
* @ORM\Column(type="string", length=250)
@ -392,6 +405,9 @@ class User implements UserInterface, \Serializable
public function setPassword($password)
{
if($password!=$this->password&&$password!=""){
// Placer le password non encodé dans une variable tempo sur laquel on va appliquer la contraite
$this->passwordplain = $password;
// Password encrypté format openldap
mt_srand((double)microtime()*1000000);
$this->salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());

View File

@ -17,6 +17,7 @@ class syncUser implements EventSubscriber
{
protected $container;
protected $shouldSync;
protected $shouldSyncpwd;
protected $baseUser;
protected $ldap_username;
@ -24,6 +25,7 @@ class syncUser implements EventSubscriber
$this->container = $container;
$this->em = $em;
$this->shouldSync = true;
$this->shouldSyncpwd = true;
$this->ldap_username = $ldap_username;
}
@ -49,7 +51,6 @@ class syncUser implements EventSubscriber
$args->hasChangedField('lastname') ||
$args->hasChangedField('email') ||
$args->hasChangedField('role') ||
$args->hasChangedField('password') ||
$args->hasChangedField('avatar') ||
$args->hasChangedField('niveau01') ||
$args->hasChangedField('niveau02') ||
@ -71,6 +72,8 @@ class syncUser implements EventSubscriber
$args->hasChangedField('birthplace')
;
$this->shouldSyncpwd = $args->hasChangedField('password');
$entity->setSiren($entity->getNiveau01()->getSiren());
$entity->setLabelniveau01($entity->getNiveau01()->getLabel());
if($entity->getNiveau02()!==null) {
@ -92,6 +95,11 @@ class syncUser implements EventSubscriber
if ($entity instanceof User && $this->shouldSync) {
$this->upsertUser($entity);
}
// On met à jour/créé le password de l'utilisateur dans l'annuaire
if ($entity instanceof User && $this->shouldSyncpwd) {
$this->upsertUserpwd($entity);
}
}
public function postPersist(LifecycleEventArgs $args)
@ -101,6 +109,7 @@ class syncUser implements EventSubscriber
// On créait une fiche pour l'usager dans l'annuaire
if ($entity instanceof User) {
$this->upsertUser($entity);
$this->upsertUserpwd($entity);
}
}
@ -178,6 +187,23 @@ class syncUser implements EventSubscriber
}
}
public function upsertUserpwd($user, $force = false)
{
// Synchonisation LDAP
$ldap = $this->container->get('cadoles.core.service.ldap');
if($ldap->isEnabled()) {
// On recherche l'utilisateur dans l'annuaire
$criteria = '('.$this->ldap_username.'='.$user->getUsername().')';
$subbranch=$this->baseUser;
$results = $ldap->search($criteria, array($this->ldap_username), $subbranch);
// Mise à jour si elle existe
if(count($results) > 0) {
$ldap->modifyUserpwd($user);
}
}
}
public function getBaseUser() {
return $this->baseUser;
}

View File

@ -109,6 +109,7 @@ services:
- %ldap_port%
- %ldap_tls%
- %ldap_type%
- %ldap_addomaine%
calls:
- [setUser, ["%ldap_user%"]]
- [setPassword, ["%ldap_password%"]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -15,23 +15,27 @@ class ldapService
protected $port;
protected $tls;
protected $type;
protected $addomaine;
protected $baseDN;
protected $baseUser;
protected $baseNiveau01;
protected $baseNiveau02;
protected $baseGroup;
protected $user = null;
protected $password = null;
private $connection = null;
private $ldapSync = false;
public function __construct($host, $port, $tls, $type)
public function __construct($host, $port, $tls, $type, $addomaine)
{
$this->host = $host;
$this->port = $port;
$this->tls = $tls;
$this->type = $type;
$this->host = $host;
$this->port = $port;
$this->tls = $tls;
$this->type = $type;
$this->addomaine = $addomaine;
}
public function isEnabled() {
@ -167,8 +171,10 @@ class ldapService
$attrs = array();
$this->fillAttributesUser($user, $attrs);
// En modification impossible de modifier le cn d'un user
unset($attrs["cn"]);
// Rechercher le DN du user
$dn = $this->getUserDN($user);
foreach($attrs as $key => $value){
@ -178,23 +184,37 @@ class ldapService
unset($attrs[$key]);
}
}
/*
$pwdtxt="Emphyrio01*";
$newPassword = "\"" . $pwdtxt . "\"";
$len = strlen($newPassword);
$newPassw = "";
for($i=0;$i<$len;$i++) {
$newPassw .= "{$newPassword{$i}}\000";
}
$attrs["unicodepwd"] = $newPassw;
*/
$result = ldap_modify($connection, $dn, $attrs);
if(!$result) $this->ldapError();
}
public function modifyUserpwd(User $user){
$dn = $this->baseDN;
$connection = $this->connect();
$attrs = array();
// Attributs associés au password
if($this->type=="AD")
$attrs["unicodepwd"] = $user->getPasswordad();
$attrs['userpassword'] = $user->getPassword();
// Rechercher le DN du user
$dn = $this->getUserDN($user);
foreach($attrs as $key => $value){
if(empty($value)){
// Bien mettre un @ car si l'attribut est déjà vide cela crache une erreur car l'attribut n'existe déjà plus
@ldap_mod_del($connection, $dn, array($key => array()));
unset($attrs[$key]);
}
}
$result = ldap_modify($connection, $dn, $attrs);
if(!$result) $this->ldapError();
}
public function addGroupUser(User $user) {
@ -294,16 +314,15 @@ class ldapService
else {
$attrs['cn'] = $user->getUsername();
$attrs['sAMAccountName'] = $user->getUsername();
$attrs["unicodepwd"] = $user->getPasswordad();
$attrs["userAccountControl"] = 544;
$attrs["homeDrive"] = "U:";
$attrs["homeDirectory"] = "\\\\".$this->addomaine."\\".$user->getUsername();
}
$attrs['givenName'] = $user->getFirstname();
$attrs['sn'] = $user->getLastname();
$attrs['mail'] = $user->getEmail();
$attrs['displayName'] = $user->getFirstname() . ' ' . $user->getLastname();
$attrs['userpassword'] = $user->getPassword();
$attrs['siren'] = $user->getNiveau01()->getSiren();
$attrs['niveau01'] = $user->getNiveau01()->getLabel();
$attrs['siret'] = ($user->getNiveau02()!==null?$user->getNiveau02()->getSiret():"");
@ -320,7 +339,6 @@ class ldapService
$attrs['belongingpopulation'] = $user->getBelongingpopulation();
$attrs['birthcountry'] = ($user->getBirthcountry()!==null?$user->getBirthcountry()->getCode():"");
$attrs['birthplace'] = ($user->getBirthplace()!==null?$user->getBirthplace()->getCode():"");
}
public function getUserDN(User $user) {

View File

@ -4,6 +4,9 @@ namespace Cadoles\CoreBundle\Validator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
/**
* @Annotation
*/
class PasswordValidator extends ConstraintValidator
{
public function validate($value, Constraint $constraint)

View File

@ -60,9 +60,12 @@ class InitDataCommand extends ContainerAwareCommand
$activate_widmoodle = $this->getContainer()->getParameter('activate_widmoodle');
$activate_widnextcloud = $this->getContainer()->getParameter('activate_widnextcloud');
$activate_widnineboard = $this->getContainer()->getParameter('activate_widnineboard');
$activate_widnineschool = $this->getContainer()->getParameter('activate_widnineschool');
$activate_widninesurvey = $this->getContainer()->getParameter('activate_widninesurvey');
$activate_widonlyoffice = $this->getContainer()->getParameter('activate_widonlyoffice');
$activate_widopensondage = $this->getContainer()->getParameter('activate_widopensondage');
$activate_widphpldapadmin = $this->getContainer()->getParameter('activate_widphpldapadmin');
$activate_widpiwigo = $this->getContainer()->getParameter('activate_widpiwigo');
$activate_widpiwik = $this->getContainer()->getParameter('activate_widpiwik');
$activate_widroundcube = $this->getContainer()->getParameter('activate_widroundcube');
$activate_widsacoche = $this->getContainer()->getParameter('activate_widsacoche');
@ -784,6 +787,50 @@ class InitDataCommand extends ContainerAwareCommand
$em->persist($entityItem);
}
// Item Nineschool
if($activate_widnineschool) {
$widnineschool_url =$this->getContainer()->getParameter('widnineschool_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-1001);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_nineschool.png"]);
$entityItem = new Item();
$entityItem->setId(-1001);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Nineschool');
$entityItem->SetSubtitle("Gestionnaire d'activités scolaire'");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widnineschool_url);
$em->persist($entityItem);
}
// Item Ninesurvey
if($activate_widninesurvey) {
$widninesurvey_url =$this->getContainer()->getParameter('widninesurvey_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-1002);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_ninesurvey.png"]);
$entityItem = new Item();
$entityItem->setId(-1002);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Ninesurvey');
$entityItem->SetSubtitle("Application de Sondage par Date");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widninesurvey_url);
$em->persist($entityItem);
}
// Item Onlyoffice
if($activate_widonlyoffice) {
$widonlyoffice_url =$this->getContainer()->getParameter('widonlyoffice_url');
@ -850,6 +897,28 @@ class InitDataCommand extends ContainerAwareCommand
$em->persist($entityItem);
}
// Item piwigo
if($activate_widpiwigo) {
$widpiwigo_url =$this->getContainer()->getParameter('widpiwigo_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-396);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_piwigo.png"]);
$entityItem = new Item();
$entityItem->setId(-396);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Piwigo');
$entityItem->SetSubtitle("Gestionnaire dalbums photos");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widpiwigo_url);
$em->persist($entityItem);
}
// Item Piwik
if($activate_widpiwik) {
$widpiwik_url =$this->getContainer()->getParameter('widpiwik_url');

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -135,6 +135,11 @@ parameters:
ldap_password: %%pwdreader("",%%ldap_reader_passfile)
%end if
ldap_basedn: %%ldap_base_dn
%if %%getVar("ninegate_ldaptype", 'LDAP') == "AD"
ldap_addomaine: %%ninegate_addomaine
%else
ldap_addomaine:
%end if
# Mise en page
weburl: %%web_url
@ -405,6 +410,20 @@ parameters:
activate_widnineboard: false
%end if
%if %%getVar("ninegate_activate_widnineschool", 'non') == "oui"
activate_widnineschool: true
widnineschool_url: %%ninegate_widnineschool_url
%else
activate_widnineschool: false
%end if
%if %%getVar("ninegate_activate_widninesurvey", 'non') == "oui"
activate_widninesurvey: true
widninesurvey_url: %%ninegate_widninesurvey_url
%else
activate_widninesurvey: false
%end if
%if %%getVar("ninegate_activate_widonlyoffice", 'non') == "oui"
activate_widonlyoffice: true
widonlyoffice_url: %%ninegate_widonlyoffice_url
@ -437,6 +456,13 @@ parameters:
activate_widphpldapadmin: false
%end if
%if %%getVar("ninegate_activate_widpiwigo", 'non') == "oui"
activate_widpiwigo: true
widpiwigo_url: %%ninegate_widpiwigo_url
%else
activate_widpiwigo: false
%end if
%if %%getVar("ninegate_activate_widpiwik", 'non') == "oui"
activate_widpiwik: true
widpiwik_url: %%ninegate_widpiwik_url