Code

Disallow creating objects in a freezed release
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Apr 2008 13:50:21 +0000 (13:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Apr 2008 13:50:21 +0000 (13:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10427 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_divListFai.inc

index 78009204429adc3ef0c8a940e663d593aa71385a..f5c4fd45fb37f2d3157a30dd11a15185c4092af5 100644 (file)
@@ -124,25 +124,30 @@ class divListFai extends MultiSelectWindow
       "&nbsp;"._("Create")."|\n";
 
     $acl = $ui->get_permissions($this->parent->fai_base,"fai/faiProfile");
-    if(preg_match("/c/",$acl)){
-      $s.= "...|<input class='center' type='image' src='images/fai_new_profile.png' alt=''>".
-        "&nbsp;"._("Profile")."|Create_profile|\n";
-    }
+    if($this->parent->lock_type == "freeze" && !$this->parent->allow_freeze_object_attach){
+      $s.= "...|<input class='center' type='image' src='images/freeze.png' alt=''>".
+        "&nbsp;"._("Freezed")."|\n";
+    }else{
+      if(preg_match("/c/",$acl)){
+        $s.= "...|<input class='center' type='image' src='images/fai_new_profile.png' alt=''>".
+          "&nbsp;"._("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.= "...|<input class='center' type='image' src='".$ar[0]."' alt=''>".
-          "&nbsp;".$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.= "...|<input class='center' type='image' src='".$ar[0]."' alt=''>".
+            "&nbsp;".$ar[1]."|".$ar[2]."|\n";
+        }
       }
     }