From: hickert Date: Wed, 22 Nov 2006 12:26:46 +0000 (+0000) Subject: Updated acl X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cc3dc895e9946f24b4d6eb7df75cc34c536f24b4;p=gosa.git Updated acl git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5193 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index 3c3a44073..a491e73c8 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -200,22 +200,13 @@ class divListMimeTypes extends MultiSelectWindow } /* Get copy Paste icons */ - if($this->parent->CopyPasteHandler){ - - /* Only add cut icon, if we are allowed to move this user */ - if(preg_match("/m/",$acl)){ - $actions.= " "; - }else{ - $actions.= " "; - } - - /* Copy is allowed everytime */ + if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ + $actions.= " "; $actions.= " "; } - /* Add edit button */ $actions.= ""; diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index af3c768f6..f4bb14f11 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -295,24 +295,32 @@ class mimetype extends plugin $EApps_Actions= ""; } - foreach($this->use_gotoMimeFilePattern as $key => $pattern){ - $field1 = array("string" => $pattern); - $field2 = array("string" => preg_replace("/%s/",$key,$Pattern_Actions),"attach"=>"style='border-right:0px;width:50px;'"); - $fields = array($field1,$field2); - $DivPatterns -> AddEntry($fields); + /* Before adding some entries check acls */ + if($this->acl_is_readable("gotoMimeFilePattern")){ + foreach($this->use_gotoMimeFilePattern as $key => $pattern){ + $field1 = array("string" => $pattern); + $field2 = array("string" => preg_replace("/%s/",$key,$Pattern_Actions),"attach"=>"style='border-right:0px;width:50px;'"); + $fields = array($field1,$field2); + $DivPatterns -> AddEntry($fields); + } + } + + if($this->acl_is_readable("gotoMimeApplication")){ + foreach($this->use_gotoMimeApplication as $key => $pattern){ + $field1 = array("string" => $pattern); + $field2 = array("string" => preg_replace("/%s/",$key,$Apps_Actions),"attach"=>"style='border-right:0px;width:50px;'"); + $fields = array($field1,$field2); + $DivApps -> AddEntry($fields); + } } - foreach($this->use_gotoMimeApplication as $key => $pattern){ - $field1 = array("string" => $pattern); - $field2 = array("string" => preg_replace("/%s/",$key,$Apps_Actions),"attach"=>"style='border-right:0px;width:50px;'"); - $fields = array($field1,$field2); - $DivApps -> AddEntry($fields); + if($this->acl_is_readable("gotoMimeEmbeddedApplication")){ + foreach($this->use_gotoMimeEmbeddedApplication as $key => $pattern){ + $field1 = array("string" => $pattern); + $field2 = array("string" => preg_replace("/%s/",$key,$EApps_Actions),"attach"=>"style='border-right:0px;width:50px;'"); + $fields = array($field1,$field2); + $DivEApps -> AddEntry($fields); + } } - foreach($this->use_gotoMimeEmbeddedApplication as $key => $pattern){ - $field1 = array("string" => $pattern); - $field2 = array("string" => preg_replace("/%s/",$key,$EApps_Actions),"attach"=>"style='border-right:0px;width:50px;'"); - $fields = array($field1,$field2); - $DivEApps -> AddEntry($fields); - } $smarty->assign("bases", $this->get_allowed_bases()); $smarty->assign("base_select", $this->base); $smarty->assign("isReleaseMimeType", $this->isReleaseMimeType);