From: hickert Date: Wed, 17 Mar 2010 13:10:06 +0000 (+0000) Subject: Updated aclRoles X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8f4cb62d860147964b654c45838679becdb4887c;p=gosa.git Updated aclRoles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16751 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 60634943f..3611ac7fe 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -518,6 +518,11 @@ class acl extends plugin $aclList= new divSelectBox("aclList"); $aclList->SetHeight(150); + // Create a map of all used sections, this allows us to simply hide the remove button + // if no acl is configured for the given section + // e.g. ';all;department/country;users/user; + $usedList = ";".implode(array_keys($this->aclContents),';').";"; + /* Add settings for all categories to the (permanent) list */ foreach ($this->aclObjects as $section => $dsc){ $summary= ""; @@ -548,7 +553,7 @@ class acl extends plugin if($this->acl_is_readable("")){ $actions.= image('images/lists/edit.png','cat_edit_'.$section, msgPool::editButton(_("category ACL"))); } - if($this->acl_is_removeable()){ + if($this->acl_is_removeable() && preg_match("/;".$section."(;|\/)/", $usedList)){ $actions.= image('images/lists/trash.png','cat_del_'.$section, msgPool::delButton(_("category ACL"))); }