parametrer la synchro scribe (ref #183)
This commit is contained in:
parent
177f366a83
commit
fb879143d5
|
@ -74,6 +74,8 @@
|
||||||
|
|
||||||
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable>
|
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable>
|
||||||
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
|
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
|
||||||
|
<variable type='oui/non' name='ninegate_scribegroup' description="Considérer les classes/options comme des groupes de travail"><value>oui</value></variable>
|
||||||
|
<variable type='oui/non' name='ninegate_scribemaster' description="Placer les professeurs comme manager des groupes classes/options"><value>oui</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>cadoles</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>cadoles</value></variable>
|
||||||
<variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable>
|
<variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable>
|
||||||
|
@ -398,6 +400,8 @@
|
||||||
|
|
||||||
<target type='variable'>ninegate_syncldap</target>
|
<target type='variable'>ninegate_syncldap</target>
|
||||||
<target type='variable'>ninegate_ldaptemplate</target>
|
<target type='variable'>ninegate_ldaptemplate</target>
|
||||||
|
<target type='variable'>ninegate_scribegroup</target>
|
||||||
|
<target type='variable'>ninegate_scribemaster</target>
|
||||||
|
|
||||||
<target type='variable'>ninegate_pwdadmin</target>
|
<target type='variable'>ninegate_pwdadmin</target>
|
||||||
<target type='variable'>ninegate_organization</target>
|
<target type='variable'>ninegate_organization</target>
|
||||||
|
@ -517,6 +521,17 @@
|
||||||
</auto>
|
</auto>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- AFFICHAGE EN FONCTION DU MODE SCRIBE -->
|
||||||
|
<condition name='hidden_if_not_in' source='ninegate_ldaptemplate'>
|
||||||
|
<param>scribe</param>
|
||||||
|
|
||||||
|
<target type='variable'>ninegate_scribegroup</target>
|
||||||
|
<target type='variable'>ninegate_scribemaster</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- AFFICHAGE EN FONCTION DU MODULE PORTAL -->
|
<!-- AFFICHAGE EN FONCTION DU MODULE PORTAL -->
|
||||||
<condition name='hidden_if_in' source='ninegate_activate_portal'>
|
<condition name='hidden_if_in' source='ninegate_activate_portal'>
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
|
|
|
@ -101,6 +101,8 @@ class SynchroCommand extends Command
|
||||||
$ldap_lastname = $this->container->getParameter('ldap_lastname');
|
$ldap_lastname = $this->container->getParameter('ldap_lastname');
|
||||||
$ldap_email = $this->container->getParameter('ldap_email');
|
$ldap_email = $this->container->getParameter('ldap_email');
|
||||||
$ldap_usersadmin = $this->container->getParameter('ldap_usersadmin');
|
$ldap_usersadmin = $this->container->getParameter('ldap_usersadmin');
|
||||||
|
$scribe_group = $this->container->getParameter('scribe_group');
|
||||||
|
$scribe_master = $this->container->getParameter('scribe_master');
|
||||||
$fieldstoread = array($ldap_username,$ldap_firstname,$ldap_lastname,$ldap_email);
|
$fieldstoread = array($ldap_username,$ldap_firstname,$ldap_lastname,$ldap_email);
|
||||||
$ldapusers = array();
|
$ldapusers = array();
|
||||||
$ldapmails = array();
|
$ldapmails = array();
|
||||||
|
@ -119,7 +121,7 @@ class SynchroCommand extends Command
|
||||||
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
||||||
$label="PROFIL - Enseignants";
|
$label="PROFIL - Enseignants";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
|
|
||||||
// Responsables
|
// Responsables
|
||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
||||||
|
@ -131,7 +133,7 @@ class SynchroCommand extends Command
|
||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
||||||
$label="PROFIL - Administratifs";
|
$label="PROFIL - Administratifs";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
|
@ -143,7 +145,7 @@ class SynchroCommand extends Command
|
||||||
|
|
||||||
$label="CLASSE - ".$result["cn"];
|
$label="CLASSE - ".$result["cn"];
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
|
@ -156,7 +158,7 @@ class SynchroCommand extends Command
|
||||||
|
|
||||||
$label="OPTION - ".$result["cn"];
|
$label="OPTION - ".$result["cn"];
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Groupes
|
// Groupes
|
||||||
|
@ -169,7 +171,7 @@ class SynchroCommand extends Command
|
||||||
|
|
||||||
$label="GROUPE - ".$result["cn"];
|
$label="GROUPE - ".$result["cn"];
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,true);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,13 +703,13 @@ class SynchroCommand extends Command
|
||||||
$group=$this->em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgtemplate' => true, 'label' => $label));
|
$group=$this->em->getRepository('CadolesCoreBundle:Group')->findOneBy(array('fgtemplate' => true, 'label' => $label));
|
||||||
if(!$group) {
|
if(!$group) {
|
||||||
$group=new Group();
|
$group=new Group();
|
||||||
$group->setFgcanshare($fgcanshare);
|
|
||||||
$group->setFgcancreatepage(false);
|
$group->setFgcancreatepage(false);
|
||||||
$group->setFgcancreateblog(false);
|
$group->setFgcancreateblog(false);
|
||||||
$group->setFgcancreatecalendar(false);
|
$group->setFgcancreatecalendar(false);
|
||||||
$group->setFgcancreateproject(false);
|
$group->setFgcancreateproject(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$group->setFgcanshare($fgcanshare);
|
||||||
$group->setLabel($label);
|
$group->setLabel($label);
|
||||||
$group->setFgopen(false);
|
$group->setFgopen(false);
|
||||||
$group->setFgall(false);
|
$group->setFgall(false);
|
||||||
|
@ -783,7 +785,8 @@ class SynchroCommand extends Command
|
||||||
|
|
||||||
// Si modèle scribe
|
// Si modèle scribe
|
||||||
$ldap_template = $this->container->getParameter('ldap_template');
|
$ldap_template = $this->container->getParameter('ldap_template');
|
||||||
if($ldap_template=="scribe") {
|
$scribe_master = $this->container->getParameter('scribe_master');
|
||||||
|
if($ldap_template=="scribe"&&$scribe_master) {
|
||||||
$ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))";
|
$ldapfilter="(|(&(uid=".$user->getUsername().")(ENTPersonProfils=enseignant))(&(uid=".$user->getUsername().")(typeadmin=0))(&(uid=".$user->getUsername().")(typeadmin=2)))";
|
||||||
$results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn);
|
$results = $this->ldap->search($ldapfilter, ['uid'], $this->ldap_basedn);
|
||||||
if($results) $member->setFgmanager(true);
|
if($results) $member->setFgmanager(true);
|
||||||
|
|
|
@ -184,6 +184,20 @@ parameters:
|
||||||
ldap_email: mail
|
ldap_email: mail
|
||||||
ldap_usersadmin: [admin]
|
ldap_usersadmin: [admin]
|
||||||
|
|
||||||
|
# Template scribe
|
||||||
|
%if %%getVar("ninegate_scribegroup", 'non') == "oui"
|
||||||
|
scribe_group: true
|
||||||
|
%else
|
||||||
|
scribe_group: false
|
||||||
|
%end if
|
||||||
|
|
||||||
|
%if %%getVar("ninegate_scribemaster", 'non') == "oui"
|
||||||
|
scribe_master: true
|
||||||
|
%else
|
||||||
|
scribe_master: false
|
||||||
|
%end if
|
||||||
|
|
||||||
|
|
||||||
# Activation Widget
|
# Activation Widget
|
||||||
%if %%getVar("ninegate_activate_widadminer", 'non') == "oui"
|
%if %%getVar("ninegate_activate_widadminer", 'non') == "oui"
|
||||||
activate_widadminer: true
|
activate_widadminer: true
|
||||||
|
|
Loading…
Reference in New Issue