Code

Updated handling of samba objectClasses
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Apr 2011 12:02:06 +0000 (12:02 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Apr 2011 12:02:06 +0000 (12:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20684 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc

index e53f284bc70d4424c535dc7bcf6fe8d5e9857455..56943662cd4b9cdf341355be1f571b2c4280b606 100644 (file)
@@ -42,7 +42,7 @@ class wingeneric extends plugin
                             "shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID",
                             "sambaPrimaryGroupSID","displayName", "sambaPwdMustChange",
                             "sambaNTPassword","sambaPwdLastSet","sambaAcctFlags");
-  var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top");
+  var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","shadowAccount","sambaSamAccount","top");
 
   var $view_logged = FALSE;
 
@@ -54,6 +54,14 @@ class wingeneric extends plugin
     $this->netConfigDNS->MACisMust = FALSE;
     $this->netConfigDNS->IPisMust = FALSE;
 
+    // The combination of the used objectClasses may differ, remember the initial ones.
+    if(isset($this->attrs['objectClass'])){
+        $this->objectclasses = array();
+        for($i=0; $i < $this->attrs['objectClass']['count'] ;  $i++ ){
+            $this->objectclasses[] = $this->attrs['objectClass'][$i];
+        }
+    }
+
     /* Set base */
     if ($this->dn == "new"){
       $ui = get_userinfo();