From: hickert Date: Mon, 6 Sep 2010 12:11:09 +0000 (+0000) Subject: Added ACL for the groupware filter dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4b5194611fbd843bfd61396a88b09944be57ee46;p=gosa.git Added ACL for the groupware filter dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19525 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc index 31ae41c39..6ba43f390 100644 --- a/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc +++ b/gosa-plugins/groupware/personal/groupware/class_filterEditor.inc @@ -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()); diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc index a4c50e91a..6e9b201b2 100644 --- a/gosa-plugins/groupware/personal/groupware/class_groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_groupware.inc @@ -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){