index 60634943f918293bb3aebadf1dddea1b07a4b2f7..a8c944033ec51c7f7b02938a86f2d1b70c3c3bda 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")));
}
"plCategory" => array("acl" => array("description" => _("ACL")." & "._("ACL roles"),
"objectClass" => array("gosaAcl","gosaRole"))),
"plProvidedAcls"=> array(
-// "cn" => _("Role name"),
+ "gosaAclEntry" => _("Acl entries")
// "description" => _("Role description")
)
}
}
+
+ // We are only interessted in our own acls ...
+ function set_acl_category($category)
+ {
+ plugin::set_acl_category("acl");
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: