X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fgroups%2Fclass_groupAcl.inc;h=363ef2eac585a994ec0ff8b868695c24954393e5;hb=6420c1233ef8781e96f767f1dc4ebd075b412494;hp=cc5c435823d6421c55c76a864dc77c2e871c5e75;hpb=fcc078a3131b821697c17c5a3e912e210f75d715;p=gosa.git
diff --git a/plugins/admin/groups/class_groupAcl.inc b/plugins/admin/groups/class_groupAcl.inc
index cc5c43582..363ef2eac 100644
--- a/plugins/admin/groups/class_groupAcl.inc
+++ b/plugins/admin/groups/class_groupAcl.inc
@@ -20,19 +20,23 @@ class acl extends plugin
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)
+ 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";
$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])){
@@ -48,6 +52,9 @@ class acl extends plugin
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we represent a valid group? */
if (!$this->is_account && $this->parent == NULL){
$display= "
".
@@ -90,8 +97,9 @@ class acl extends plugin
$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"));
}
@@ -108,7 +116,7 @@ class acl extends plugin
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= "";
@@ -129,13 +137,13 @@ class acl extends plugin
}
/* 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";
@@ -153,7 +161,6 @@ class acl extends plugin
} else {
$this->selfflag= FALSE;
}
-
}
@@ -185,8 +192,10 @@ class acl extends plugin
/* 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"));
}