Code

Udpated mimetype acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jul 2007 12:58:57 +0000 (12:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jul 2007 12:58:57 +0000 (12:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6753 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/acl_definition.inc
plugins/admin/mimetypes/class_mimetypeGeneric.inc
plugins/admin/mimetypes/class_mimetypeManagement.inc

index 0bba710c6043c4567ac142d8c80fbf253a217359..0cb3e7dcb16687dca1c4eafb5217dcaa94c95e37 100644 (file)
@@ -455,5 +455,5 @@ $ACLD['scalix']     = array(
                "scalixLimitNotifyUser"         => _("Notify user"),
                "scalixEmailAddress"            => _("Scalix email addresses"));
  
-
+$ACLD['mimetype'] = array("create","remove","cn","gotoMimeApplication","gotoMimeLeftClickAction","gotoMimeIcon","description","gotoMimeFilePattern","gotoMimeEmbeddedApplication","gotoMimeGroup","gotoMimeFilePattern","gotoMimeApplication","gotoMimeEmbeddedApplication");
 ?>
index 7a803015abcf3a00050e65078a5598fafaf8ea18..90616a41c4e08ba3cab4b23399dc14d1bb4418d5 100644 (file)
@@ -157,7 +157,6 @@ class mimetype extends plugin
       $this->view_logged =TRUE;
     }
 
-    $tmp = $this->plInfo();
     foreach($this->attributes as $name){
       $smarty->assign($name."ACL", chkacl($this->acl,$name));
     }
@@ -668,31 +667,6 @@ class mimetype extends plugin
     }
   }
 
-  /* Return plugin informations for acl handling  */ 
-  function plInfo()
-  {
-    return (array(
-          "plShortName"   => _("Generic"),
-          "plDescription" => _("Mime type generic"),
-          "plSelfModify"  => FALSE,
-          "plDepends"     => array(),
-          "plPriority"    => 0,
-          "plSection"     => array("administration"),
-          "plCategory"    => array("mimetypes" => array("description"  => _("Mime types"),
-                                                        "objectClass"  => "gotoMimeType")),
-          "plProvidedAcls"=> array(
-            "cn"                          => _("Name"),
-            "gotoMimeGroup"               => _("Mime group"),
-            "description"                 => _("Description"),
-            "base"                        => _("Base"),
-            "gotoMimeApplication"         => _("Application"),
-            "gotoMimeLeftClickAction"     => _("Left click action"),
-            "gotoMimeIcon"                => _("Icon"),
-            "gotoMimeFilePattern"         => _("File patterns"),
-            "gotoMimeEmbeddedApplication" => _("Embedded applications"))
-          ));
-
-  }
 
   function PrepareForCopyPaste($source)
   {
index f4bf712fc7631ecff50b463bd1440cb554e59a6c..f9a58748f28b698e4c515a39bbc00f352c161d6d 100755 (executable)
@@ -254,7 +254,7 @@ class mimetypeManagement extends plugin
       $this->mimetabs= new mimetabs($this->config,$this->config->data['TABS']['MIMETABS'], $this->dn);
 
       /* Set up the users ACL's for this 'dn' */
-      $acl= get_permissions ($this->DivListMimeTypes->selectedBase, $this->ui->subtreeACL);
+      $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
       $this->mimetabs->set_acl($acl);
 
       $_SESSION['objectinfo']= $this->dn;
@@ -309,8 +309,8 @@ class mimetypeManagement extends plugin
 
       /* Load permissions for selected 'dn' and check if
          we're allowed to remove this 'dn' */
-      $acl= get_permissions ($dn, $this->ui->subtreeACL);
-      $acl= get_module_permission($acl, "mimetypes", $dn);
+      $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
+      $acl= get_module_permission($acl, "mimetype", $this->dn);
 
       if (chkacl($acl,"remove") == ""){
 
@@ -344,13 +344,13 @@ class mimetypeManagement extends plugin
 
       /* Load permissions for selected 'dn' and check if
          we're allowed to remove this 'dn' */
-      $acl= get_permissions ($dn, $this->ui->subtreeACL);
-      $acl= get_module_permission($acl, "mimetypes", $dn);
-
+      $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
+      $acl= get_module_permission($acl, "mimetype", $this->dn);
+  
       if (chkacl($acl,"remove") == ""){
 
         /* Delete request is permitted, perform LDAP action */
-        $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetypes");
+        $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetype");
         $this->mimetabs->set_acl_base($this->dn);
         $this->mimetabs->delete ();
         unset ($this->mimetabs);
@@ -361,7 +361,6 @@ class mimetypeManagement extends plugin
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
         print_red (_("You are not allowed to delete this mime type!"));
-        new log("security","mimetypes/".get_class($this),$dn,array(),"Tried to trick deletion.");
       }
 
       /* Remove lock file after successfull deletion */
@@ -491,7 +490,7 @@ class mimetypeManagement extends plugin
       /* Cleanup object queue */
       $this->CopyPasteHandler->cleanup_queue();
       $dn = $this->mimetypes[$s_entry]['dn'];
-      $this->CopyPasteHandler->add_to_queue($dn,$s_action,"mimetabs","MIMETABS","mimetypes");
+      $this->CopyPasteHandler->add_to_queue($dn,$s_action,"mimetabs","MIMETABS","mimetype");
     }
 
     /* Add entries to queue */
@@ -505,10 +504,10 @@ class mimetypeManagement extends plugin
         $dn = $this->mimetypes[$id]['dn'];
 
         if($s_action == "copy_multiple"){
-          $this->CopyPasteHandler->add_to_queue($dn,"copy","mimetabs","MIMETABS","mimetypes");
+          $this->CopyPasteHandler->add_to_queue($dn,"copy","mimetabs","MIMETABS","mimetype");
         }
         if($s_action == "cut_multiple"){
-          $this->CopyPasteHandler->add_to_queue($dn,"cut","mimetabs","MIMETABS","mimetypes");
+          $this->CopyPasteHandler->add_to_queue($dn,"cut","mimetabs","MIMETABS","mimetype");
         }
       }
     }