From: psc Date: Tue, 7 Sep 2010 12:52:41 +0000 (+0000) Subject: Apply patch for #2025 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86e6374ce02fc116dbc9d0f5c1852c5d32ba5684;p=gosa.git Apply patch for #2025 Do not check ACLs in the faiDebconfConfigurations class. Instead, do not display the 'Edit Debconf Configurations' button if the FAIdebconfInfo ACL is not present for writing, in line with the faiPackageConfiguration class. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@19552 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiDebconfConfigurations.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiDebconfConfigurations.inc index b376993ca..bf9d1c6e4 100644 --- a/trunk/gosa-plugins/fai/admin/fai/class_faiDebconfConfigurations.inc +++ b/trunk/gosa-plugins/fai/admin/fai/class_faiDebconfConfigurations.inc @@ -205,8 +205,7 @@ class faiDebconfConfigurations extends plugin /* Define actions for this entry */ $actions = ""; - if(!preg_match('/^freeze/', $this->FAIstate) && - $this->acl_is_writeable("FAIdebconfInfo")) { + if(!preg_match('/^freeze/', $this->FAIstate)) { /* Don't enable actions if no gosa-si defaults available */ $show_reset = FALSE; $show_edit = FALSE; diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 9bf75f598..3cf8cc46d 100644 --- a/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -55,6 +55,7 @@ class faiPackage extends plugin var $direct_packages_add = FALSE; var $configure_dialog_shown = FALSE; + var $debconf_configurations = FALSE; function faiPackage (&$config, $dn= NULL) { @@ -288,7 +289,7 @@ class faiPackage extends plugin } if(isset($_POST['EditConfigurations']) && - $this->acl_is_writeable("FAIpackage")) { + $this->acl_is_writeable("FAIdebconfInfo")) { $this->dialog = new faiDebconfConfigurations($this->config, $this->dn, $this); $this->dialog->set_acl_base($this->acl_base); $this->is_dialog = true; @@ -535,6 +536,10 @@ class faiPackage extends plugin foreach($tmp['plProvidedAcls'] as $name => $translated){ $smarty->assign($name."ACL",$this->getacl($name,preg_match("/freeze/",$this->FAIstate))); } + + if ($this->acl_is_writeable("FAIdebconfInfo")) { + $this->debconf_configurations = TRUE; + } $smarty->assign("freeze", preg_match("/freeze/",$this->FAIstate)); $smarty->assign("divlist",$divlist->DrawList()); @@ -542,6 +547,7 @@ class faiPackage extends plugin $smarty->assign("sections",$this->sections); $smarty->assign("section" ,$strsec); $smarty->assign("direct_packages_add", $this->direct_packages_add); + $smarty->assign("debconf_configurations", $this->debconf_configurations); $display.= $smarty->fetch(get_template_path('faiPackage.tpl', TRUE)); return($display); } diff --git a/trunk/gosa-plugins/fai/admin/fai/faiPackage.tpl b/trunk/gosa-plugins/fai/admin/fai/faiPackage.tpl index 870ae6ea9..19c10cf25 100644 --- a/trunk/gosa-plugins/fai/admin/fai/faiPackage.tpl +++ b/trunk/gosa-plugins/fai/admin/fai/faiPackage.tpl @@ -87,8 +87,9 @@ {/if} - +{if $debconf_configurations} +{/if} {/render}