X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fgroups%2Fclass_groupAcl.inc;h=363ef2eac585a994ec0ff8b868695c24954393e5;hb=6420c1233ef8781e96f767f1dc4ebd075b412494;hp=f6bee91b6265ad94711393c93d58cc038bd30c16;hpb=4046672cefec055a41663e540f5e67f67796529b;p=gosa.git diff --git a/plugins/admin/groups/class_groupAcl.inc b/plugins/admin/groups/class_groupAcl.inc index f6bee91b6..363ef2eac 100644 --- a/plugins/admin/groups/class_groupAcl.inc +++ b/plugins/admin/groups/class_groupAcl.inc @@ -20,14 +20,17 @@ class acl extends plugin var $current_acl= ""; var $selfflag= FALSE; + var $gosaSubtreeACL; /* 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"; @@ -95,9 +98,8 @@ class acl extends plugin $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")); } @@ -114,7 +116,7 @@ $ldap->modify ($this->attrs); 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= ""; @@ -135,13 +137,13 @@ $ldap->modify ($this->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"; @@ -159,7 +161,6 @@ $ldap->modify ($this->attrs); } else { $this->selfflag= FALSE; } - } @@ -192,9 +193,9 @@ $ldap->modify ($this->attrs); /* 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")); }