index 6b41d82449a0be22094fcc9aa10107098622f619..9fdb2b15de0f1c98dc14f1ceab8470efb0b317e9 100644 (file)
$ldap->cd ($this->dn);
$attrs_to_search = $this->subAttributes;
$attrs_to_search[] = "FAIstate";
- $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))", array("dn"));
+ $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))", $attrs_to_search);
while($object = $ldap->fetch()){
+
+ /* Skip objects, that are tagged as removed */
+ if(isset($object['FAIstate'][0])){
+ if(preg_match("/removed$/",$object['FAIstate'][0])){
+ continue;
+ }
+ }
+
/* Set status for save management */
$objects = array();
$objects['status'] = "FreshLoaded";
if(preg_match("/d/",$acl)){
$once = false;
- if(($this->SubObjects[$entry]['status'] == "edited")||($this->SubObjects[$entry]['status'] == "FreshLoaded")){
+ $status = $this->SubObjects[$entry]['status'];
+ if($status == "edited" || $status == "FreshLoaded"){
$this->SubObjects[$entry]['status']= "delete";
}else{
unset($this->SubObjects[$entry]);
foreach($this->getList(true) as $key => $name){
$dn= $this->acl_base_for_current_object($name['dn']);
- $acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry") ;
+ $acl = $this->ui->get_permissions($dn,"fai/faiHookEntry") ;
$act = "";
/* Check if this object is freezed, in this case hide the delete icon */
}
/* Check if we are allowed to use the export button for this object */
- $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","FAIscript") ;
+ $s_acl = $this->ui->get_permissions($dn,"fai/faiHookEntry","FAIscript") ;
if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new") || !preg_match("/r/",$s_acl)){
$down = "";
}else{
}
/* Check if we are allowed to view the object */
- $s_acl = $this->ui->get_permissions($dn,"fai/faiScriptEntry","cn") ;
+ $s_acl = $this->ui->get_permissions($dn,"fai/faiHookEntry","cn") ;
if(preg_match("/r/",$s_acl)){
$divlist->AddEntry(array( array("string"=>$name['name']),
array("string"=>$down , "attach" => "style='width:20px;'"),
$tmp = $this->plInfo();
$c_dn = $this->acl_base_for_current_object($this->dn);
- $smarty->assign("sub_object_is_addable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiScriptEntry")) && $this->FAIstate!="freeze");
+ $smarty->assign("sub_object_is_addable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiHookEntry")) && $this->FAIstate!="freeze");
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign($name."ACL",$this->getacl($name));
}