summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5138e8c)
raw | patch | inline | side by side (parent: 5138e8c)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Sep 2010 12:52:41 +0000 (12:52 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Sep 2010 12:52:41 +0000 (12:52 +0000) |
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
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 b376993ca1e81b0d6acd30f303a0c59d4843b00d..bf9d1c6e453ffb184d490158e31841711fe84dec 100644 (file)
/* 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 9bf75f59808807ce078fd9f5a2eefc507a51a572..3cf8cc46da98c0a16e46950c0ce7fc4886f7af82 100644 (file)
var $direct_packages_add = FALSE;
var $configure_dialog_shown = FALSE;
+ var $debconf_configurations = FALSE;
function faiPackage (&$config, $dn= NULL)
{
}
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;
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());
$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 870ae6ea999e2e753ce128320b341fe322abddaf..19c10cf25fe1e25cfef4e095f2cb56bc28a56ce9 100644 (file)
{/if}
</td>
<td style="text-align: right;">
- <!-- ToDo: ACL? --!>
+{if $debconf_configurations}
<input type="submit" name="EditConfigurations" value="{t}Edit package configurations{/t}">
+{/if}
</td>
</tr>
{/render}