Code

Udpated FAI ACLs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Nov 2008 11:00:15 +0000 (11:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Nov 2008 11:00:15 +0000 (11:00 +0000)
-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

gosa-plugins/fai/admin/fai/class_faiHook.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
gosa-plugins/fai/admin/fai/class_faiProfile.inc
gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiTemplate.inc
gosa-plugins/fai/admin/fai/class_faiVariable.inc
gosa-plugins/fai/admin/fai/main.inc

index 141fc5e3d7ba9bb7f94137ebb870736e1a6ef890..ec0ccda9ee15d33041c1f328f9d35d68ee06b6ee 100644 (file)
@@ -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;
       }
index 6c02e1ae5da6b3d96f2c5d58b8aeb308a710f3be..fa9f1de2431d8a6ed050397176d0bae5dbb47c68 100644 (file)
@@ -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;
index d624dfca520ce6aabac33462bf76fdff13936cf1..481430ab53155df0427c66698acf9e09cc179d78 100644 (file)
@@ -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;
       }
index 601b2f1b2dfb296c33990d8753b0d5603dd82355..01ec1a4bc478c23a1ee6b52772626fdfff6ef8ce 100644 (file)
@@ -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;
       }
index fe28af277f9940572a0ab65e8f1a0687cddb5a26..f3e4d7a1746d288ac7484439febd3d0d7a141da9 100644 (file)
@@ -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;
       }
index e1286d28210dd6700511957dad74c5db8fdb914f..0f0b30490ecfa09b7e854ea71811bbc95d87c595 100644 (file)
@@ -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;
       }
index c915d1f41b0486ae499b19df1b98b3d47167a4d3..907dbaa4824bc154c35cede05ee9c2a78a419aa7 100644 (file)
@@ -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;
       }
index 9ffb498abd8a43633e091235c20822b96f2f5c6a..9bb02687677bdd0207cd3d6e2ef196f2d566a588 100644 (file)
@@ -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');