From: hickert Date: Wed, 24 Feb 2010 11:35:50 +0000 (+0000) Subject: Moved system activation code to correct to correct place, use the objects target... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bd46976c82287bcb077690619c226cc29e7aac6f;p=gosa.git Moved system activation code to correct to correct place, use the objects target dn instead of its source dn with 'ou=incoming' git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@15691 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 0238d71f7..5d8fc6977 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -870,15 +870,6 @@ class systemManagement extends management msg_dialog::display(_("Internal error"), _("Cannot set mode to 'active'!"), ERROR_DIALOG); } - // Update object group membership - $og = new ogroup($this->config,$data['OG']); - if($og){ - $og->AddDelMembership($this->tabObject->dn); - $og->save(); - @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, - $og->dn, "Adding system to ogroup"); - } - // Set default system specific attributes foreach (array("workgeneric", "termgeneric") as $cls){ if (isset($this->tabObject->by_object[$cls])){ @@ -1032,6 +1023,20 @@ class systemManagement extends management */ function activate_new_device($dn) { + // finally add entry to ogroup, with its new dn not the source dn with 'ou=incoming.' + if(isset($this->activationQueue[$this->last_dn])){ + $data =$this->activationQueue[$this->last_dn]; + + // Update object group membership + $og = new ogroup($this->config,$data['OG']); + if($og){ + $og->AddDelMembership($this->last_tabObject->dn); + $og->save(); + @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, + $og->dn, "Adding system to ogroup"); + } + } + @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $dn, "Activating system:"); $ldap = $this->config->get_ldap_link();