From: hickert Date: Thu, 6 Nov 2008 11:00:15 +0000 (+0000) Subject: Udpated FAI ACLs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f2626109693b8cc398e72f38e555acaf52d371bc;p=gosa.git Udpated FAI ACLs -Work with user filter now. We check the current Object "ou=base" instead of cn=dummy,... which doesn't match the filter in any case. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12935 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index 141fc5e3d..ec0ccda9e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -102,7 +102,7 @@ class faiHook extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn = session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 6c02e1ae5..fa9f1de24 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -916,14 +916,12 @@ class faiManagement extends plugin /* New Profile */ if($s_action == "new_profile"){ $this->dn = "new" ; - - $acl = $this->ui->get_permissions($this->fai_base,"fai/faiProfile"); + $acl = $this->ui->get_permissions($this->acl_base,"fai/faiProfile"); if(preg_match("/c/",$acl)){ $a_setup= $this->get_type(array("objectClass"=>array("FAIprofile"))); $this->dialog = new $a_setup[0]($this->config,$this->config->data['TABS'][$a_setup[2]],$this->dn,"fai"); - $this->dialog->set_acl_base($this->base); + $this->dialog->set_acl_base($this->acl_base); $this->dialog->parent = &$this; - $this->is_dialog = false; }else{ msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to create a new %s!"), _("profile")), ERROR_DIALOG); @@ -948,7 +946,7 @@ class faiManagement extends plugin if(class_exists($a_setup[0])){ $this->dialog = new $a_setup[0]($this->config,$this->config->data['TABS'][$a_setup[2]],$this->dn,"fai"); - $this->dialog->set_acl_base($this->base); + $this->dialog->set_acl_base($this->acl_base); $this->dialog->by_object[$a_setup[1]]->cn = $name; $this->dialog->parent = &$this; $this->is_dialog = true; diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index d624dfca5..481430ab5 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -84,7 +84,7 @@ class faiPartitionTable extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn = session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index 601b2f1b2..01ec1a4bc 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -120,7 +120,7 @@ class faiProfile extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn = session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index fe28af277..f3e4d7a17 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -110,7 +110,7 @@ class faiScript extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn= "cn=dummy,".session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index e1286d282..0f0b30490 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -185,7 +185,7 @@ class faiTemplate extends plugin /* Add new sub object */ if(isset($_POST['AddSubObject']) && !preg_match("/freeze/",$this->FAIstate)){ - $acl_dn = "cn=dummy,".$this->acl_base_for_current_object($this->dn); + $acl_dn = $this->acl_base_for_current_object($this->dn); $acl = $this->ui->get_permissions($acl_dn,"fai/faiTemplateEntry"); if(preg_match("/c/",$acl)){ @@ -344,7 +344,7 @@ class faiTemplate extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn = session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc index c915d1f41..907dbaa48 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -65,7 +65,7 @@ class faiVariable extends plugin { if($dn == "new"){ if($this->dn == "new"){ - $dn = session::get('CurrentMainBase'); + $dn= $this->parent->parent->acl_base; }else{ $dn = $this->dn; } diff --git a/gosa-plugins/fai/admin/fai/main.inc b/gosa-plugins/fai/admin/fai/main.inc index 9ffb498ab..9bb026876 100644 --- a/gosa-plugins/fai/admin/fai/main.inc +++ b/gosa-plugins/fai/admin/fai/main.inc @@ -30,7 +30,6 @@ if ($remove_lock){ if (!session::is_set('FAI') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $FAI= new faiManagement($config, $ui); $FAI->set_acl_category("fai"); - $FAI->set_acl_base(session::get('CurrentMainBase')); session::set('FAI',$FAI); } $FAI = session::get('FAI');