summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9311742)
raw | patch | inline | side by side (parent: 9311742)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Jul 2006 04:35:20 +0000 (04:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Jul 2006 04:35:20 +0000 (04:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4108 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/acl/class_aclManagement.inc | patch | blob | history | |
plugins/admin/acl/class_divListACL.inc | patch | blob | history |
index 0dcc48b7e3def3a537d6a4be51fcaedd539cc269..a0d33319675a97f906e344ddce52e5650d5c50ca 100644 (file)
/* Save, or display error message? */
if (count($message) == 0){
- /* No errors. Go ahead and prepare to ask for a password
- in case we're creating a new acl. 'dn' will be 'new'
- in this case. It is set to the correct value later. */
- if ($this->dn == "new"){
- $set_pass= 1;
- } else {
- $set_pass= 0;
- }
-
/* Save acl data to ldap */
if($this->acltabs->save() == 1){
gosa_log ("ACL object '".$this->dn."' saving failed.");
index 2e0e3c1c6897e0c50eb02f1433f06af19ebb8d44..d320d2e29f29907eb3c9e503a1506060285cf3c3 100644 (file)
var $parent ;
var $ui ;
+
+
function divListACL ($config,$parent)
{
MultiSelectWindow::MultiSelectWindow($config,"ACLs");
$this->AddHeader(array("string"=>" ", "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>_("Summary")));
$this->AddHeader(array("string"=>_("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
-
+
+ /* Set dynamically filter checkboxes */
+ $this->set_filter_objectclasses();
+
/* Add SubSearch checkbox */
-// $this->AddCheckBox(SEPERATOR);
+ $this->AddCheckBox(SEPERATOR);
$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false);
+
/* Name ,Text ,Default , Connect with alphabet */
$this->AddRegex ("Regex", _("Display acls matching"),"Not implemented yet" , true);
}
foreach($list as $key => $acl_entry){
- $action = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."' name='acl_edit_%KEY%' title='"._("Edit system")."'>";
- $action.= $this->GetSnapShotActions($acl_entry['dn']);
- $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."' name='acl_del_%KEY%' title='"._("Delete system")."'>";
-
- $field1 = array("string" => $list_left_icon, "attach"=> "style='text-align:center;width:20px;'");
- $field2 = array("string" => htmlentities(utf8_decode($acl_entry['dn'])),"attach" => "");
- $field3 = array("string" => preg_replace("/%KEY%/",$key,$action), "attach"=> "style='text-align:center;width:80px;border-right:0px;'");
+ $skip = true;
+ foreach($this->get_filter_objectclasses() as $oc){
+ if(in_array($oc,$acl_entry['objectClass']) && $this->$oc){
+ $skip = false;
+ }
+ }
- $this->AddElement(array($field1,$field2,$field3));
+ if(!$skip){
+ $action = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ name='acl_edit_%KEY%' title='"._("Edit system")."'>";
+ $action.= $this->GetSnapShotActions($acl_entry['dn']);
+ $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
+ name='acl_del_%KEY%' title='"._("Delete system")."'>";
+
+ $field1 = array("string" => $list_left_icon, "attach"=> "style='text-align:center;width:20px;'");
+ $field2 = array("string" => htmlentities(utf8_decode($acl_entry['dn']))." ","attach" => "");
+ $field3 = array("string" => preg_replace("/%KEY%/",$key,$action), "attach"=> "style='text-align:center;width:80px;border-right:0px;'");
+ $this->AddElement(array($field1,$field2,$field3));
+ }
}
}
/* Save automatic created POSTs like regex, checkboxes */
MultiSelectWindow::save_object();
}
+
+
+ /* Add some additional checkboxes to the filter part, this should be generated dynamically. */
+ function set_filter_objectclasses()
+ {
+ #FIXME This should be created dynamically
+ $this->gosaAccount = true;
+ $this->AddCheckBox("gosaAccount", _("Select to display users"), _("Display user") , true);
+ $this->gosaDepartment = true;
+ $this->AddCheckBox("gosaDepartment", _("Select to display departments"), _("Display departments"), true);
+ }
+
+
+ /* Return objectClass names used in filter part */
+ function get_filter_objectclasses()
+ {
+ return(array("gosaAccount","gosaDepartment"));
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>