Code

Updated winstations.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Jul 2008 08:51:22 +0000 (08:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Jul 2008 08:51:22 +0000 (08:51 +0000)
- Fixed existence check.
- Fixed problem with rewritten uid.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11602 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index edfbf3fc402942d073e31b0f8abd7d2d2c2a46f9..c210b96f61e2defd03310bccb5455b62252241de 100644 (file)
@@ -49,6 +49,8 @@ class wingeneric extends plugin
   {
     plugin::plugin ($config, $dn, $parent);
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
+    $this->netConfigDNS->MACisMust = FALSE;
+
     /* Set base */
     if ($this->dn == "new"){
       $ui= get_userinfo();
@@ -199,14 +201,9 @@ class wingeneric extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
-    $this->dn= "cn=".$this->cn.",".get_ou('componentou').$this->base;
-    
-    /* Set new acl base */
-    if($this->dn == "new") {
-      $this->set_acl_base($this->base);
-    }
+    $this->dn= "cn=".$this->uid.",".get_ou('winstations').$this->base;
 
-    if(!$this->acl_is_createable() && $this->dn == "new"){
+    if(!$this->acl_is_createable()){
       $message[]= msgPool::permCreate();
     }
 
index 3adcb2de699ac04fcad9485ce4211703488d363f..d6089135f6d00c17abaa4cec468ff27d5ddd6232 100644 (file)
@@ -28,7 +28,8 @@ class wintabs extends tabs
       $baseobject->cn .= "$";
     }
 
-    $this->dn= "uid=$baseobject->cn,".get_winstations_ou().$baseobject->base;
+    /* Save this system with uid and NOT cn */
+    $this->dn= "uid=$baseobject->uid,".get_winstations_ou().$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){