ne plus concidèrer les profils scribe comme des groupes de travail
This commit is contained in:
parent
4f2fa1db4f
commit
d0d8183f7a
|
@ -180,6 +180,20 @@ class ScriptCommand extends Command
|
||||||
$this->writeln("");
|
$this->writeln("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->container->getParameter('ldap_template')=="scribe") {
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"purgepageprofil"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = purgepageprofil");
|
||||||
|
$this->purgepageprofil();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("purgepageprofil");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,6 +448,20 @@ class ScriptCommand extends Command
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function purgepageprofil() {
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Enseignants']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Administratifs']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,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,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
// Responsables
|
// Responsables
|
||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
||||||
|
@ -140,7 +140,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,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
// Niveaux
|
// Niveaux
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
|
|
Loading…
Reference in New Issue