From: hickert Date: Mon, 17 Sep 2007 13:48:13 +0000 (+0000) Subject: Update groups acls, if group dn has changed X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9a97100f7f0992f37491ed540874ab5610ee1f18;p=gosa.git Update groups acls, if group dn has changed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7308 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index da836f268..aad633524 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -549,6 +549,11 @@ class group extends plugin $acl -> save(); } + /* Remove ACL dependencies too, + */ + $tmp = new acl($this->config,$this->parent,$this->dn); + $tmp->remove_acl(); + /* Send signal to the world that we've done */ $this->handle_post_events("remove"); } @@ -764,6 +769,13 @@ class group extends plugin $this->cleanup(); $ldap->$mode($this->attrs); + /* Remove ACL dependencies too, + */ + if($this->dn != $this->orig_dn && $this->orig_dn != "new"){ + $tmp = new acl($this->config,$this->parent,$this->dn); + $tmp->update_acl_membership($this->orig_dn,$this->dn); + } + if($this->initially_was_account){ new log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 27d617d8c..617c7eaca 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -962,8 +962,10 @@ class user extends plugin /* Remove ACL dependencies too, */ - $tmp = new acl($this->config,$this->parent,$this->dn); - $tmp->update_acl_membership($this->orig_dn,$this->dn); + if($this->dn != $this->orig_dn && $this->orig_dn != "new"){ + $tmp = new acl($this->config,$this->parent,$this->dn); + $tmp->update_acl_membership($this->orig_dn,$this->dn); + } if($mode == "modify"){ new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());