Code

Updated addressbook.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Jul 2009 06:08:37 +0000 (06:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Jul 2009 06:08:37 +0000 (06:08 +0000)
-Readable departments were not listed in the department list.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13954 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc

index f3675a5c90696f79ac30a7cabfb9aaa28c0f7238..b81933e1d0e89195fff51e6bdba81f7166791f1b 100644 (file)
@@ -502,8 +502,18 @@ class addressbook extends plugin
     $smarty->assign("search_for", $this->search_for);
     $smarty->assign("object_type", $this->object_type);
 
+    /* Create list of readable departments */
+    $deps = array();
+    foreach($this->config->idepartments as $dn => $name){
+      if( $this->acl_is_readable($dn)){
+        $deps[$dn] = $name;
+      }
+    }
+
+
+  
     $this->base = $phonefilter['search_base'];
-    $smarty->assign("deplist", $this->get_allowed_bases());
+    $smarty->assign("deplist", $deps);
     $smarty->assign("depselect", $this->search_base);
     $smarty->assign("global", $phonefilter['global']);
     $smarty->assign("organizational", $phonefilter['organizational']);