From: hickert Date: Thu, 10 Apr 2008 13:51:40 +0000 (+0000) Subject: Added accessTo update to components X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f876410f6ac5257d24174180315a4ae17a76e191;p=gosa.git Added accessTo update to components git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10330 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 02f6106a3..603e110af 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -32,6 +32,7 @@ class servgeneric extends plugin var $l= ""; var $description= ""; var $orig_dn= ""; + var $orig_cn= ""; /* attribute list for save action */ var $attributes= array("cn", "description","gotoMode"); @@ -93,6 +94,7 @@ class servgeneric extends plugin /* Save dn for later references */ $this->orig_dn= $this->dn; + $this->orig_cn= $this->cn; } @@ -241,6 +243,8 @@ class servgeneric extends plugin $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); + update_accessTo($this->orig_cn,""); + new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); if (!$ldap->success()){ @@ -370,6 +374,11 @@ class servgeneric extends plugin $ldap->modify ($this->attrs); new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + /* Update all accessTo/trust dependencies */ + if($this->orig_cn != $this->cn){ + update_accessTo($this->orig_cn,$this->cn); + } + $mode= "modify"; } if (!$ldap->success()){