index c56dd69c711bcfec4fd1584bf2d4733cead7e63c..233e59b69a592b3c6c85568802711801f938cf81 100644 (file)
var $current_acl= "";
var $selfflag= FALSE;
+ var $gosaSubtreeACL;
/* attribute list for save action */
- var $attributes= array();
+ var $attributes= array("gosaSubtreeACL");
var $objectclasses= array("gosaObject");
- function acl ($config, $dn= NULL)
+ function acl ($config, $dn= NULL, $parent= NULL)
{
- plugin::plugin($config, $dn);
+ plugin::plugin($config, $dn, $parent);
/* WorkAround */
include "acl_definition.inc";
$this->objects= $ACLD;
- $this->object= reset(array_keys($this->objects));
+ $tmp= array_keys($this->objects);
+ $this->object= reset($tmp);
$this->selfflag= FALSE;
if (isset($this->attrs['gosaSubtreeACL'][0])){
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we represent a valid group? */
if (!$this->is_account && $this->parent == NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ $this->cleanup();
+ $ldap->modify ($this->attrs);
+ show_ldap_error($ldap->get_error(), _("Removing ACL information failed"));
}
if ($this->object == "all"){
$this->current_acl= preg_replace ( "/[,]?all[,]?/", "", $this->current_acl);
}
- $this->current_acl= preg_replace ( "/[,]?$this->object#[^,]*[,]?/", "", $this->current_acl);
+ $this->current_acl= preg_replace ( "/(^|[^a-z0-9A-Z])$this->object#[^,]*[,]?/", "", $this->current_acl);
/* assemble new attributes */
$attrs= "";
}
/* append information */
- if ($this->current_acl != "" && $attrs != ""){
- $this->current_acl.= ",";
- }
if ($attrs != ""){
$tmp= $this->object;
$attrs= $tmp.$attrs;
}
+ if ($this->current_acl != "" && $attrs != ""){
+ $this->current_acl.= ",";
+ }
$this->current_acl.= $attrs;
if (preg_match("/all#all/", $this->current_acl)){
$this->current_acl= "all";
} else {
$this->selfflag= FALSE;
}
-
}
/* Modify class */
$ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ $this->cleanup();
+ $ldap->modify ($this->attrs);
+
+ show_ldap_error($ldap->get_error(), _("Saving ACL information failed"));
}
asort ($name);
# Generate checklist
- $display.= "<table style=\"width:100%;\">\n";
+ $display.= "<table summary=\"\" style=\"width:100%;\">\n";
$switch= 0;
foreach ($name as $key => $val){
if ($switch == 0){