Code

Added ACL for the groupware filter dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 12:11:09 +0000 (12:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 12:11:09 +0000 (12:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19525 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_filterEditor.inc
gosa-plugins/groupware/personal/groupware/class_groupware.inc

index 31ae41c39ae9a7d45a9e0ada3d569624c299d24c..6ba43f3900ef8320ec664c66e7a3bcbb021dbd75 100644 (file)
@@ -5,22 +5,26 @@ class filterEditor extends plugin{
     var $filterListing   = NULL;
     var $filterRules = array();
 
-    function __construct($config, $rules)
+    function __construct($config,$parent,$rules)
     {
         plugin::plugin($config);
-        $this->filterRules = $rules;
+        
+        $this->parent = &$parent;
 
+        $this->filterRules = $rules;
         $this->filterListing= new sortableListing();
         $this->filterListing->setDeleteable(true);
         $this->filterListing->setEditable(true);
         $this->filterListing->setColspecs(array('*'));
         $this->filterListing->setWidth("100%");
         $this->filterListing->setHeight("200px;");
+        $this->filterListing->setAcl($this->parent->getacl('mailFilter'));
     }
 
     function execute()
     {
 
+
         $this->filter = array(); 
         $this->filter[] =   array (
                 'TYPE' => 'AND',
@@ -65,6 +69,14 @@ class filterEditor extends plugin{
 
         $smarty = get_smarty();
 
+        $data = $lData = array();
+        foreach($this->filter as $key => $filter){
+            $data[$key] = $filter;
+            $lData[$key] = array('data' => array($filter['NAME'], $filter['DESC']));
+        }
+        $this->filterListing->setListData($data,$lData);
+        $this->filterListing->update();
+
 
 
         $smarty->assign('list', $this->filterListing->render());
index a4c50e91aad3890d0ed2622b0f0642a538aa71fd..6e9b201b2c340c9f606aaffdf29c042d55198e8e 100644 (file)
@@ -116,7 +116,9 @@ class groupware extends plugin
 
         if(isset($_POST['filterEditor_cancel'])) $this->filterEditor = NULL;
         if(isset($_POST['configureFilter'])){
-            $this->filterEditor = new filterEditor($this->config, $this->filterRules);
+            $this->filterEditor = new filterEditor($this->config, $this,$this->filterRules);
+            $this->filterEditor->acl_base = $this->acl_base;
+            $this->filterEditor->acl_category = $this->acl_category;
         }
         $this->dialog = FALSE;
         if($this->filterEditor instanceOf filterEditor){