Code

Fixed acls & picture settings
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Sep 2006 05:38:41 +0000 (05:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 8 Sep 2006 05:38:41 +0000 (05:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4621 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 8f0594aec21b2d012b3acf97518946fdad33a54b..cdadb5be263880255efca9e61257bd7cca4d1afd 100644 (file)
@@ -521,6 +521,8 @@ class mimetype extends plugin
     if (empty($filename)){
       $filename= "./images/default_icon.png";
       $this->use_gotoMimeIcon= "*removed*";
+    }else{
+      $this->use_gotoMimeIcon= $filename;
     }
 
     if (file_exists($filename)){
index 7bd52da85eb88dbac20b555585bebfc08ebcd81e..3ee002eca2626df699727e1c159ee9e43422b597 100755 (executable)
@@ -260,7 +260,9 @@ class mimetypeManagement extends plugin
 
       /* Load permissions for selected 'dn' and check if
          we're allowed to remove this 'dn' */
-      if ($this->acl_is_removeable()){
+      $ui = get_userinfo();
+      $acl = $ui->get_permissions($this->dn,"mimetypes/mimetype");
+      if (preg_match("/d/",$acl)){
 
         /* Check locking, save current plugin in 'back_plugin', so
            the dialog knows where to return. */
@@ -291,8 +293,9 @@ class mimetypeManagement extends plugin
 
       /* Some nice guy may send this as POST, so we've to check
          for the permissions again. */
-      if ($this->acl_is_removeable()){
-
+      $ui = get_userinfo();
+      $acl = $ui->get_permissions($this->dn,"mimetypes/mimetype");
+      if(preg_match("/d/",$acl)){
         /* Delete request is permitted, perform LDAP action */
         $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetypes");
         $this->mimetabs->set_acl_base($this->dn);