summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19ccd85)
raw | patch | inline | side by side (parent: 19ccd85)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 13:10:40 +0000 (13:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 13:10:40 +0000 (13:10 +0000) |
-Implemented freeze handling
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11706 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11706 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 5995d16075183da9f7a81d0cccb21da9ce9590a7..4cf072e49afa7676a550a973f2561dae61a5e76b 100644 (file)
"gosaApplicationFlags","gotoLogonScript");
var $objectclasses= array("top", "gosaApplication");
+ var $FAIstate ="";
function application (&$config, $dn= NULL, $parent= NULL)
{
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation){
- $smarty->assign($name."ACL",$this->getacl($name));
+ $smarty->assign($name."ACL",$this->getacl($name, preg_match("/freeze/i",$this->FAIstate)));
}
/* Do we represent a valid group? */
$head = $this->generateTemplate();
$this->gotoLogonScript= $this->generateTemplate().preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
- if((isset($_POST['upLoad']))&&(isset($_FILES['ScriptFile']))){
+ if((isset($_POST['upLoad']))&&(isset($_FILES['ScriptFile'])) && !preg_match("/freeze/i",$this->FAIstate)){
$str = file_get_contents($_FILES['ScriptFile']['tmp_name']);
$this->gotoLogonScript = $str;
}
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
+ if(preg_match("/^chooseBase/",$name) && $once && !preg_match("/freeze/i",$this->FAIstate)){
$once = false;
$this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
/* Save data to object */
function save_object()
{
+ if(preg_match("/freeze/i",$this->FAIstate)){
+ return;
+ }
+
if (isset($_POST['cn'])){
/* Create a base backup and reset the
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index b4f83907f3eb9bf15762786d0735aa31ed574b83..b7f040d78140994b03cd53f7541808e73f6608f2 100644 (file)
/* Register apptabs to trigger edit dialog */
$this->apptabs= new apptabs($this->config,$this->config->data['TABS']['APPSTABS'], $this->dn,"application");
+ if($this->IsReleaseManagementActivated()){
+ $this->apptabs->set_FAIstate($this->applications[$s_entry]['FAIstate'][0]);
+ }
$this->apptabs->parent = &$this;
$this->apptabs->set_acl_base($this->dn);
session::set('objectinfo',$this->dn);
/* Don't show buttons if tab dialog requests this */
if (!$this->apptabs->by_object[$this->apptabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
- $display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
- $display.= " \n";
- if ($this->dn != "new"){
- $display.= "<input type=submit name=\"edit_apply\" value=\"".msgPool::applyButton()."\">\n";
+
+ if(isset($this->apptabs->FAIstate) && !preg_match("/freeze/i",$this->apptabs->FAIstate)){
+ $display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
+ if ($this->dn != "new"){
+ $display.= "<input type=submit name=\"edit_apply\" value=\"".msgPool::applyButton()."\">\n";
+ $display.= " \n";
+ }
}
$display.= "<input type=\"submit\" name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
$display.= "</p>";
$use_base = $this->app_release;
$SubSearch= FALSE;
}
-
+
+ /* Add FAIstate to the search attributes */
+ $search_attrs = array("cn","description","dn","objectClass");
+ if($this->IsReleaseManagementActivated()) {
+ $search_attrs[] = "FAIstate";
+ }
+
if($SubSearch){
- $res= get_sub_list($Filter, "application",get_ou("applicationou"), $use_base, array("cn","description","dn","objectClass"), $Flags);
+ $res= get_sub_list($Filter, "application",get_ou("applicationou"), $use_base, $search_attrs, $Flags);
}else{
- $res= get_list($Filter, "application",$use_base, array("cn","description","dn","objectClass"), $Flags);
+ $res= get_list($Filter, "application",$use_base, $search_attrs, $Flags);
}
$tmp2 = array();
foreach ($res as $val){
+ if(!isset($val['FAIstate'])){
+ $val['FAIstate'][0] = "";
+ }
$tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val;
$tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn'];
}
diff --git a/gosa-plugins/goto/admin/applications/class_divListApplication.inc b/gosa-plugins/goto/admin/applications/class_divListApplication.inc
index 24d55ef248e9243a50427d2c052c654aee4cdc1b..cb096f5c627d47a3c1ef729282bdab477e7ed92d 100644 (file)
$acl = $ui->get_permissions($val['dn'],"application/application");
$acl_all= $ui->has_complete_category_acls($val['dn'],"application");
+ /* Check FAI state
+ */
+ $FAIstate = $val['FAIstate'][0];
+
/* Create action icons */
$actions= "";
/* Add copy & cut functionality */
- $actions.= $this->parent->get_copypaste_action($val['dn'],"application","application");
+ if(!preg_match("/freeze/i",$FAIstate)){
+ $actions.= $this->parent->get_copypaste_action($val['dn'],"application","application");
+ }else{
+ $actions.= "<img src='images/empty.png' class='center' alt=''> ";
+ $actions.= "<img src='images/empty.png' class='center' alt=''> ";
+ }
/* Add edit icon */
$actions.= "<input class='center' type='image'
src='images/lists/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
+ if(!preg_match("/freeze/i",$FAIstate)){
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
+ }else{
+ $actions.= "<img src='images/empty.png' class='center' alt=''> ";
+ $actions.= "<img src='images/empty.png' class='center' alt=''> ";
+ }
+
/* If we are allowed to remove the application account, display remove icon */
- if(preg_match("/d/",$acl)){
+ if(preg_match("/freeze/i",$FAIstate)){
+ $actions .= "<img src='images/freeze.png' class='center' alt='!' title='"._("Freezed")."'>";
+ }elseif(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
src='images/lists/trash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
}else{
diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc
index 9636c44db90d962227ea0a6d56f69d6410b6872d..53b0916cd180ae348977b179be830d795f65451d 100644 (file)
class apptabs extends tabs
{
- var $parent = FALSE;
+ var $parent = FALSE;
+ var $FAIstate = "";
function apptabs($config, $data, $dn,$category)
{
$this->addSpecialTabs();
}
+ function set_FAIstate($state)
+ {
+ $this->FAIstate = $state;
+ foreach($this->by_name as $name => $desc){
+ $this->by_object[$name]->FAIstate = $state;
+ }
+ }
+
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['application'];