From 82c28f61c67898f868b96aec66e137c05a737dc0 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 May 2011 09:27:29 +0000 Subject: [PATCH] Updated TemplateEngine itself to support ACLs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20883 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../newConfigManagement/TemplateEngine/TemplateEngine.tpl | 4 +++- .../TemplateEngine/class_TemplateEngine.inc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl index 99be42628..4484bb2e2 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl @@ -7,6 +7,8 @@
- + {if $hasWriteAcls} + + {/if}
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc index b88c03a5e..5809525a4 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc @@ -10,7 +10,7 @@ class TemplateEngine private $template = ""; private $itemType = ''; private $widgets = array(); - + private $hasWriteAcls = FALSE; /*! \brief Constructs the template engine. * @param Config The GOsa configuration object. @@ -77,6 +77,7 @@ class TemplateEngine function setAcls($acls) { $this->acls = $acls; + $this->hasWriteAcls = preg_match("/w/", implode($acls)); } @@ -165,6 +166,7 @@ class TemplateEngine { $smarty = get_smarty(); $smarty->assign("type", $this->itemType); + $smarty->assign("hasWriteAcls", $this->hasWriteAcls); $smarty->assign("typeData", $this->data[$this->itemType]); // Tell smarty the HTML-content for each widget and the name that should be -- 2.30.2