summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dbac56e)
raw | patch | inline | side by side (parent: dbac56e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 May 2011 09:27:29 +0000 (09:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 May 2011 09:27:29 +0000 (09:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20883 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl
index 99be426283e73d90046dccb3fba0899f5d60cb1d..4484bb2e241b5aa062b84727f69d2894e06dd9ec 100644 (file)
<hr>
<div class='plugin-actions'>
- <button name='saveItemEdit'>{msgPool type=okButton}</button>
+ {if $hasWriteAcls}
+ <button name='saveItemEdit'>{msgPool type=okButton}</button>
+ {/if}
<button name='cancelItemEdit'>{msgPool type=cancelButton}</button>
</div>
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 b88c03a5ee28e728e43e614956a966372f5cf821..5809525a434f8023427fd83cb7cb2a2761ab1669 100644 (file)
private $template = "";
private $itemType = '';
private $widgets = array();
-
+ private $hasWriteAcls = FALSE;
/*! \brief Constructs the template engine.
* @param Config The GOsa configuration object.
function setAcls($acls)
{
$this->acls = $acls;
+ $this->hasWriteAcls = preg_match("/w/", implode($acls));
}
{
$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