index f6bee91b6265ad94711393c93d58cc038bd30c16..363ef2eac585a994ec0ff8b868695c24954393e5 100644 (file)
var $current_acl= "";
var $selfflag= FALSE;
var $current_acl= "";
var $selfflag= FALSE;
+ var $gosaSubtreeACL;
/* attribute list for save action */
var $attributes= array("gosaSubtreeACL");
var $objectclasses= array("gosaObject");
/* attribute list for save action */
var $attributes= array("gosaSubtreeACL");
var $objectclasses= array("gosaObject");
- function acl ($config, $dn= NULL)
+ var $CopyPasteVars = array("current_acl");
+
+ function acl ($config, $dn= NULL, $parent= NULL)
{
{
- plugin::plugin($config, $dn);
+ plugin::plugin($config, $dn, $parent);
/* WorkAround */
include "acl_definition.inc";
/* WorkAround */
include "acl_definition.inc";
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
-
- show_ldap_error($ldap->get_error());
+ $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);
}
if ($this->object == "all"){
$this->current_acl= preg_replace ( "/[,]?all[,]?/", "", $this->current_acl);
}
- $this->current_acl= preg_replace ( "/[^a-z0-9A-Z]$this->object#[^,]*[,]?/", "", $this->current_acl);
+ $this->current_acl= preg_replace ( "/(^|[^a-z0-9A-Z])$this->object#[^,]*[,]?/", "", $this->current_acl);
/* assemble new attributes */
$attrs= "";
/* assemble new attributes */
$attrs= "";
}
/* append information */
}
/* append information */
- if ($this->current_acl != "" && $attrs != ""){
- $this->current_acl.= ",";
- }
if ($attrs != ""){
$tmp= $this->object;
$attrs= $tmp.$attrs;
}
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";
$this->current_acl.= $attrs;
if (preg_match("/all#all/", $this->current_acl)){
$this->current_acl= "all";
} else {
$this->selfflag= FALSE;
}
} else {
$this->selfflag= FALSE;
}
-
}
}
/* Modify class */
$ldap->cd($this->dn);
$this->cleanup();
/* Modify class */
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving ACL information failed"));
}
}