From 60c02cdc7b3869513bb5394291406ba9d9202119 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 14 Apr 2008 13:50:21 +0000 Subject: [PATCH] Disallow creating objects in a freezed release git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10427 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_divListFai.inc | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index 780092044..f5c4fd45f 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -124,25 +124,30 @@ class divListFai extends MultiSelectWindow " "._("Create")."|\n"; $acl = $ui->get_permissions($this->parent->fai_base,"fai/faiProfile"); - if(preg_match("/c/",$acl)){ - $s.= "...|". - " "._("Profile")."|Create_profile|\n"; - } + if($this->parent->lock_type == "freeze" && !$this->parent->allow_freeze_object_attach){ + $s.= "...|". + " "._("Freezed")."|\n"; + }else{ + if(preg_match("/c/",$acl)){ + $s.= "...|". + " "._("Profile")."|Create_profile|\n"; + } - /* Append create icons for each fai component */ - $arr = array( - array("images/fai_new_partitionTable.png" , _("Partition table") ,"Create_partition" , _("PT") , "faiPartitionTable"), - array("images/fai_new_script.png" , _("Scripts") ,"Create_script" , _("S") , "faiScript"), - array("images/fai_new_hook.png" , _("Hooks") ,"Create_hook" , _("H") , "faiHook"), - array("images/fai_new_variable.png" , _("Variables") ,"Create_variable" , _("V") , "faiVariable"), + /* Append create icons for each fai component */ + $arr = array( + array("images/fai_new_partitionTable.png" , _("Partition table") ,"Create_partition" , _("PT") , "faiPartitionTable"), + array("images/fai_new_script.png" , _("Scripts") ,"Create_script" , _("S") , "faiScript"), + array("images/fai_new_hook.png" , _("Hooks") ,"Create_hook" , _("H") , "faiHook"), + array("images/fai_new_variable.png" , _("Variables") ,"Create_variable" , _("V") , "faiVariable"), array("images/fai_new_template.png" , _("Templates ") ,"Create_template" , _("I") , "faiTemplate"), array("images/fai_new_packages.png" , _("Package list") ,"Create_package" , _("PK") , "faiPackage")); - foreach($arr as $ar){ - $acl = $ui->get_permissions($this->parent->fai_base,"fai/".$ar[4]); - if(preg_match("/c/",$acl)){ - $s.= "...|". - " ".$ar[1]."|".$ar[2]."|\n"; + foreach($arr as $ar){ + $acl = $ui->get_permissions($this->parent->fai_base,"fai/".$ar[4]); + if(preg_match("/c/",$acl)){ + $s.= "...|". + " ".$ar[1]."|".$ar[2]."|\n"; + } } } -- 2.30.2