Code

Updated FAI management/divlist
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Nov 2008 07:43:58 +0000 (07:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Nov 2008 07:43:58 +0000 (07:43 +0000)
-Ensure that we check the correct dns for ACLs

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12911 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index be5072f22a32be65c1102c573038ff480bb61a9c..2fba9796636b57a0d0940d6abbbd79eb84b15d32 100644 (file)
@@ -129,7 +129,7 @@ class divListFai extends MultiSelectWindow
     $add_sep = false;
 
     /* Get complete fai acls, to be able to check if we must show or hide the snapshot abilities */ 
-    $acl_all = $ui->has_complete_category_acls($this->parent->fai_base,$this->module);
+    $acl_all = $ui->has_complete_category_acls($this->config->current['BASE'],$this->module);
 
     /* Add default header */
     $listhead = MultiSelectWindow::get_default_header(false);
@@ -143,7 +143,7 @@ class divListFai extends MultiSelectWindow
     $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Create")."|\n";
 
-    $acl = $ui->get_permissions($this->parent->fai_base,"fai/faiProfile");
+    $acl = $ui->get_permissions($this->config->current['BASE'],"fai/faiProfile");
     if($this->parent->lock_type == "freeze" && !$this->parent->allow_freeze_object_attach){
       $s.= "...|<input class='center' type='image' src='plugins/fai/images/freeze.png' alt=''>".
         "&nbsp;"._("Freezed")."|\n";
@@ -169,7 +169,7 @@ class divListFai extends MultiSelectWindow
             "Create_package"   , _("PK") , "faiPackage"));
 
       foreach($arr as $ar){
-        $acl = $ui->get_permissions($this->parent->fai_base,"fai/".$ar[4]);
+        $acl = $ui->get_permissions($this->config->current['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";
@@ -269,7 +269,7 @@ class divListFai extends MultiSelectWindow
        /* Add copy & cut icons */
        $ui = get_userinfo();
        $action ="";
-       $acl_all = $ui->has_complete_category_acls($this->parent->fai_base,$this->module);
+       $acl_all = $ui->has_complete_category_acls($this->config->current['BASE'],$this->module);
 
        if(preg_match("/^opsi_/",$type)){
          $editlink ="<a href='?plug=".$_GET['plug']."&amp;edit_opsi_entry=%KEY%' title='%TITLE%'>%NAME%</a>";
index b65e4476439472179ec282c492797de6c26ec809..35d5cb0600f576a3211637452705e787c4e1d787 100644 (file)
@@ -81,7 +81,10 @@ class faiManagement extends plugin
       $this->CopyPasteHandler= new CopyPasteHandler($this->config);
     }
 
-    /* Set default release */
+    /* Set default release 
+       !! If you change the base here you have to update the base in 
+           class_divListFai.inc too, all ACL checks use ($this->config->current['BASE']).
+     */
     $this->fai_base = get_ou("faiBaseRDN").$this->config->current['BASE'];
 
     if(!session::is_set("fai_filter")){