Code

Added AutoScrollDown to "FAI branch IFrame" just for testing. Looks good.
[gosa.git] / plugins / admin / fai / class_faiVariable.inc
index 3e012aad146851b7707eed33bde197364dcfcd8d..60baec911497eab02a7b911977eeb5fda39d0c57 100644 (file)
@@ -58,7 +58,7 @@ class faiVariable extends plugin
 
       $attrs_to_search = $this->subAttributes;
       $attrs_to_search[] = "FAIstate";
-      $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$this->subAttributes);
+      $ldap->search("(&(objectClass=FAIclass)(objectClass=".$this->subClass."))",$attrs_to_search);
 
       while($object = $ldap->fetch()){
       
@@ -206,12 +206,21 @@ class faiVariable extends plugin
       return($display);
     }
 
-    $smarty->assign("SubObjects",$this->getList());
+    $ui = get_userinfo();
+    $ret = $this->getList();
+    $tmp = array();
+    foreach($this->SubObjects as $key => $obj){
+      $acl = $ui->get_permissions($obj['dn'],"fai/faiVariableEntry");
+      if(preg_match("/r/",$acl)){
+        $tmp[$key] = $ret[$key];
+      } 
+    }
+    $smarty->assign("SubObjects",$tmp);
+
 
-      /* Magic quotes GPC, escapes every ' " \, to solve some security risks
+    /* Magic quotes GPC, escapes every ' " \, to solve some security risks
      * If we post the escaped strings they will be escaped again
      */
-
     foreach($this->attributes as $attrs){
       if(get_magic_quotes_gpc()){
         $smarty->assign($attrs,htmlentities (stripslashes(utf8_decode($this->$attrs))));