From: hickert Date: Wed, 21 May 2008 07:11:20 +0000 (+0000) Subject: Updated FAI management. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8b668710875e079c1637d26d11c0100dddd1dbb5;p=gosa.git Updated FAI management. -Allow edit of manually added object in a freeze. (if allow_freeze_object_attach=TRUE) git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10975 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index cd812b24d..2f781b979 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -47,7 +47,7 @@ class faiManagement extends plugin /* Allow inserting of new elements if freezed releases */ - var $allow_freeze_object_attach = FALSE; + var $allow_freeze_object_attach = TRUE; var $no_save; var $fai_base =""; @@ -1096,12 +1096,23 @@ class faiManagement extends plugin * entry is of type 'freeze' or 'branch' */ if(!isset($object['FAIstate'])){ - $obj['FAIstate'] = $this->lock_type; + + /* Is this entry inherited from an earlier release? + In this case inherit the FAIstate from the release container. + If this is a newly created entry (allow_freeze_object_attach == TRUE) + then allow to edit this entry by setting its FAIstate manually to branch. + */ + if($this->allow_freeze_object_attach && preg_match("/".normalizePreg($this->fai_release)."$/i",$object['dn'])){ + $obj['FAIstate'] = "branch|overridden_by_management_reload"; + }else{ + $obj['FAIstate'] = $this->lock_type; + } + }else{ $obj['FAIstate'] = $object['FAIstate'][0]; } - if($force_freezed){ + if($force_freezed && !$this->allow_freeze_object_attach){ $obj['FAIstate'] = "freeze"; }