From: hickert Date: Mon, 14 Apr 2008 10:31:39 +0000 (+0000) Subject: Do not allow to copy objects into a freezed release X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3b1f739f19cfa3c39a5f67c4e9509aeb866b51b4;p=gosa.git Do not allow to copy objects into a freezed release git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10408 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index f1c500ddf..98be0f7ba 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -229,7 +229,8 @@ class divListFai extends MultiSelectWindow } /* Add copy & paste icons, currently disabled, this ability is not implemeneted yet */ - if(preg_match("/(c.*w|w.*c)/",$acl_all) && isset($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler){ + if(!($this->parent->lock_type == "freeze" && !$this->parent->allow_freeze_object_attach) && + preg_match("/(c.*w|w.*c)/",$acl_all) && isset($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler){ $s .= "..|---|\n"; if($this->parent->CopyPasteHandler->entries_queued()){ $img = ""; diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index e855f8775..34144831e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -46,6 +46,10 @@ class faiManagement extends plugin var $CopyPasteHandler = FALSE; var $base = ""; + /* Allow inserting of new elements if freezed releases + */ + var $allow_freeze_object_attach = FALSE; + var $no_save; /* construction/reconstruction @@ -884,10 +888,10 @@ class faiManagement extends plugin } /* Display dialog with system list */ + $this->reload(); $this->DivListFai->parent = $this; $this->DivListFai->execute(); $this->DivListFai->AddDepartments($this->DivListFai->selectedBase,4,1); - $this->reload(); $this->DivListFai->setEntries($this->objects); return($this->DivListFai->Draw()); } @@ -1162,7 +1166,7 @@ class faiManagement extends plugin } /* Start pasting entries */ - if($s_action == "editPaste"){ + if($s_action == "editPaste" && !($this->lock_type == "freeze" && !$this->allow_freeze_object_attach)){ $this->start_pasting_copied_objects = TRUE; }