From 895712accc11cf9defc13cdbc64a6b3c7e7e548a Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 8 Sep 2006 05:38:41 +0000 Subject: [PATCH] Fixed acls & picture settings git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4621 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/mimetypes/class_mimetypeGeneric.inc | 2 ++ plugins/admin/mimetypes/class_mimetypeManagement.inc | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index 8f0594aec..cdadb5be2 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -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)){ diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index 7bd52da85..3ee002eca 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -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); -- 2.30.2