summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 536c93c)
raw | patch | inline | side by side (parent: 536c93c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Jul 2007 12:55:58 +0000 (12:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 Jul 2007 12:55:58 +0000 (12:55 +0000) |
Hide release options when post methods are missing
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6776 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6776 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/branch_selector.tpl | patch | blob | history | |
plugins/admin/fai/class_divListFai.inc | patch | blob | history | |
plugins/admin/fai/class_faiManagement.inc | patch | blob | history |
index d76abb3586279b4ec57c93b752c2766dd3b8d907..03fd36442fbf9edb3d72e690fd42927f1ef1a569 100644 (file)
<table summary="" style="width:100%;">
<tr>
<td>
- <input type="image" align="middle" value="branch" name="branch_branch" src="images/branch_small.png">
-
- {t}Create new branch{/t}
- <br>
- <input type="image" align="middle" value="freeze" name="freeze_branch" src="images/closedlock.png">
-
- {t}Create new locked branch{/t}
- {if $selectedBranch != "main"}
+ {if $allow_remove}
+ <input type="image" align="middle" value="branch" name="branch_branch" src="images/branch_small.png">
+
+ {t}Create new branch{/t}
+ <br>
+ <input type="image" align="middle" value="freeze" name="freeze_branch" src="images/closedlock.png">
+
+ {t}Create new locked branch{/t}
+ {/if}
+ {if $selectedBranch != "main" && $allow_remove}
<br>
- <input type="image" align="middle" value="delete" name="remove_branch" src="images/edittrash.png">
+ <input type="image" align="middle" value="delete" name="remove_branch" src="images/edittrash.png">
{t}Delete current release{/t}
{/if}
index 41dd8dcdfbcd1a3473483cdee56662488aa2ca47..79b98c166cd2e4e3e4d69cff96756f06fb39fcfa 100644 (file)
$this->AddRegex ("Regex", _("Display users matching"),"*" , true);
}
- function AddUserBoxToFilter($position){
+ function AddUserBoxToFilter($position)
+ {
$str = "";
if($position == 2){
+
+ $r = "" != search_config($this->config->data,"faiManagement","POSTREMOVE");
+ $c = "" != search_config($this->config->data,"faiManagement","POSTCREATE");
+
$smarty = get_smarty();
+ $smarty->assign("allow_create", $c);
+ $smarty->assign("allow_remove", $r);
$smarty->assign("selectedBranch",$this->selectedBranch);
$smarty->assign("branchimage","images/branch.png");
$smarty->assign("branches",$this->AvailableBranches);
index 77ebbda94b147f0b1ce38aebe6c184f95be7d313..1b199d8b9a68aee721b55dbb795755b8fe6ca3f7 100644 (file)
/* Remove branch
*/
if($s_action == "remove_branch"){
- $base= $this->DivListFai->selectedBranch;
- /* Load permissions for selected 'dn' and check if
- we're allowed to remove this 'dn' */
- $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
- $this->acl= get_module_permission($acl, "FAIclass", $base);
- if (chkacl($this->acl, "delete") == ""){
- $smarty->assign("info", sprintf(_("You're about to delete a fai branch / freeze '%s'."), $this->DivListFai->selectedBranch));
- return($smarty->fetch(get_template_path('remove_branch.tpl',TRUE)));
- } else {
- print_red (_("You are not allowed to delete this release!"));
+ $r = "" != search_config($this->config->data,"faiManagement","POSTREMOVE");
+ if($r){
+
+ $base= $this->DivListFai->selectedBranch;
+
+ /* Load permissions for selected 'dn' and check if
+ we're allowed to remove this 'dn' */
+ $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
+ $this->acl= get_module_permission($acl, "FAIclass", $base);
+ if (chkacl($this->acl, "delete") == ""){
+ $smarty->assign("info", sprintf(_("You're about to delete a fai branch / freeze '%s'."), $this->DivListFai->selectedBranch));
+ return($smarty->fetch(get_template_path('remove_branch.tpl',TRUE)));
+ } else {
+ print_red (_("You are not allowed to delete this release!"));
+ }
}
}
****************/
if(isset($_POST['delete_branch_confirm'])){
+
+ $r = "" != search_config($this->config->data,"faiManagement","POSTREMOVE");
+
$bb = $this->DivListFai->selectedBranch;
if(!isset($ldap)){
$ldap = $this->config->get_ldap_link();
$this->postremove();
}
}
+ }
/****************
Display dialog to enter new Branch name
****************/
- $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
- $this->acl= get_module_permission($acl, "FAIclass", $this->DivListFai->selectedBase);
- if((($s_action == "branch_branch")||($this->dispNewBranch)) && chkacl($this->acl,"FAIclass") == ""){
- $this->dispNewBranch=true;
- $smarty->assign("iframe",false);
- $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
- return($display);
+ $c = "" != search_config($this->config->data,"faiManagement","POSTCREATE");
+
+ if($c){
+ $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
+ $this->acl= get_module_permission($acl, "FAIclass", $this->DivListFai->selectedBase);
+ if((($s_action == "branch_branch")||($this->dispNewBranch)) && chkacl($this->acl,"FAIclass") == ""){
+ $this->dispNewBranch=true;
+ $smarty->assign("iframe",false);
+ $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
}
-
-
+
/****************
Display dialog to enter new Freeze name
****************/
- $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
- $this->acl= get_module_permission($acl, "FAIclass", $this->DivListFai->selectedBase);
- if((($s_action == "freeze_branch")||($this->dispNewFreeze)) && chkacl($this->acl,"FAIclass") == ""){
- $this->dispNewFreeze = true;
- $smarty->assign("iframe",false);
- $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
- return($display);
+ $c = "" != search_config($this->config->data,"faiManagement","POSTCREATE");
+
+ if($c){
+ $acl= get_permissions ($this->DivListFai->selectedBase, $this->ui->subtreeACL);
+ $this->acl= get_module_permission($acl, "FAIclass", $this->DivListFai->selectedBase);
+ if((($s_action == "freeze_branch")||($this->dispNewFreeze)) && chkacl($this->acl,"FAIclass") == ""){
+ $this->dispNewFreeze = true;
+ $smarty->assign("iframe",false);
+ $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
}