diff --git a/gosa-core/plugins/admin/acl/class_divListACL.inc b/gosa-core/plugins/admin/acl/class_divListACL.inc
index dcf6b64989cd2d4e4b79af39efb87381fe62a47d..5d78f82b3d30000c07e2858003745b4df334ab23 100644 (file)
function divListACL (&$config, &$parent)
{
- MultiSelectWindow::MultiSelectWindow($config, "ACL", array("acl","aclroles"));
+ MultiSelectWindow::MultiSelectWindow($config, "ACL", array("acl","acl"));
$this->parent = &$parent;
$this->ui = get_userinfo();
$action = "";
+ /* Handle ACL role entries
+ */
if(in_array("gosaRole",$acl_entry['objectClass'])){
- /* Role handling */
- $acl = $this->ui->get_permissions($acl_entry['dn'],"aclroles/aclRole");
- $acl_all = $this->ui->has_complete_category_acls($acl_entry['dn'],"aclroles");
+ $acl = $this->ui->get_permissions($acl_entry['dn'],"acl/aclrole");
+ $acl_all = $this->ui->has_complete_category_acls($acl_entry['dn'],"acl");
$editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=list_edit_role'>%s</a>";
$list_left_icon = "<img src='plugins/acl/images/role.png' alt='"._("Role")."'>";
}
/* Add copy & cut functionality */
- $action.= $this->parent->get_copypaste_action($acl_entry['dn'],"aclroles","aclRole");
+ $action.= $this->parent->get_copypaste_action($acl_entry['dn'],"acl","aclRole");
/* Add actions depending on acls */
if(preg_match("/r/", $acl)){
}
/* Add snapshot functionality */
- $action.= $this->parent->get_snapshot_action($acl_entry['dn'],"aclroles");
-
- if(preg_match("/d/", $acl)){
- $action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
- name='list_acl_role_del_%KEY%' title='"._("Delete acl role")."'>";
- }
-
- $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
- "attach" => "style='width:20px;'");
+ $action.= $this->parent->get_snapshot_action($acl_entry['dn'],"acl");
}else{
+ /* Handle non-role ACL entries */
$acl = $this->ui->get_permissions($acl_entry['dn'],"acl/acl");
$acl_all = $this->ui->has_complete_category_acls($acl_entry['dn'],"acl");
/* Acl handling */
$editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=list_edit_entry'>%s</a>";
$list_left_icon = "<img src='images/lists/locked.png' alt='"._("ACL")."'>";
- $cn = htmlentities(utf8_decode($acl_entry['dn']));
+ $cn = preg_replace('/\\\\,/', ',', LDAP::fix($acl_entry['dn']));
/* Add actions depending on acls */
if(preg_match("/r/", $acl)){
$action.= "<input class='center' type='image' src='images/lists/edit.png' alt='"._("edit")."'
name='list_acl_edit_%KEY%' title='"._("Edit acl")."'>";
}
- if(preg_match("/d/", $acl)){
- $action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
- name='list_acl_del_%KEY%' title='"._("Delete acl")."'>";
- }
- $field0 = array("string" => "", "attach" => "style='width:20px;'");
}
+ /* Add delete actions */
+ if(preg_match("/d/", $acl)){
+ $action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
+ name='list_acl_del_%KEY%' title='"._("Delete acl")."'>";
+ }
+
+ /* Add a checkbox in front of each entry
+ */
+ $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
+ "attach" => "style='width:20px;'");
+
/* Cutted objects should be displayed in light grey */
$display = $cn;
if($this->parent->CopyPasteHandler){
}
}
- $field1 = array("string" => $list_left_icon, "attach"=> "style='text-align:center;width:20px;'");
- $field2 = array("string" => sprintf($editlink,$key,$display)." ","attach" => "");
- $field3 = array("string" => preg_replace("/%KEY%/",$key,$action), "attach"=> "style='text-align:right;width:".$this->action_col_size."px;border-right:0px;'");
+ $field1 = array("string" => $list_left_icon,
+ "attach"=> "style='text-align:center;width:20px;'");
+ $field2 = array("string" => sprintf($editlink,$key,$display)." ",
+ "attach" => "");
+ $field3 = array("string" => preg_replace("/%KEY%/",$key,$action),
+ "attach"=> "style='text-align:right;width:".$this->action_col_size."px;border-right:0px;'");
$this->AddElement(array($field0,$field1,$field2,$field3));
}
}
+
function Save()
{
MultiSelectWindow :: Save();