summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 80a9c77)
raw | patch | inline | side by side (parent: 80a9c77)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 13:10:06 +0000 (13:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 13:10:06 +0000 (13:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16751 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_acl.inc | patch | blob | history |
index 60634943f918293bb3aebadf1dddea1b07a4b2f7..3611ac7fe0a0ada042a59d467e71cee9401867c3 100644 (file)
$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= "";
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")));
}