Code

Fixed winstation save
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Oct 2006 03:14:00 +0000 (03:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 2 Oct 2006 03:14:00 +0000 (03:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4840 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc
plugins/admin/systems/class_winGeneric.inc

index afcd002120f77f1eda675f97034da8c0622f4224..0d570f50ef51f6edb22c32b157e5b7e9d3a5a22c 100644 (file)
@@ -526,7 +526,7 @@ class termDNS extends plugin
         "plDepends"     => array(),
         "plPriority"    => 5,
         "plSection"     => array("administration"),
-        "plCategory"    => array("workstation","terminal","phone","server","component","printer"),
+        "plCategory"    => array("workstation","terminal","phone","server","component","printer","winworkstation"),
 
         "plProvidedAcls"=> array(
           "ipHostNumber"  => _("IP address"),
index 6947658769a52334385023b1c9c15ffba9951bec..db058f5810d43d95df54a6be18a7458893e90c1e 100644 (file)
@@ -62,6 +62,20 @@ class wingeneric extends plugin
     $this->orig_dn= $this->dn;
   }
 
+
+  function set_acl_base($base)
+  {
+    plugin::set_acl_base($base);
+    $this->netConfigDNS->set_acl_base($base);
+  }
+
+  function set_acl_category($cat)
+  {
+    plugin::set_acl_category($cat);
+    $this->netConfigDNS->set_acl_category($cat);
+  }
+
+
   function execute()
   {
        /* Call parent execute */
@@ -195,6 +209,10 @@ class wingeneric extends plugin
       $this->attrs= $attrs;
     }
 
+    if(($this->gosaUnitTag) && (!in_array_ics("gosaAdministrativeUnitTag",$this->attrs['objectClass']))){
+      $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag";
+    }
+
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();
     if ($this->orig_dn == 'new'){
@@ -215,8 +233,9 @@ class wingeneric extends plugin
       $this->handle_post_events("modify");
     }
 
-    $this->netConfigDNS->cn = $this->cn;
-    $this->netConfigDNS->save($this->dn);
+    # FIXME can't save mac address
+    #$this->netConfigDNS->cn = $this->cn;
+    #$this->netConfigDNS->save($this->dn);
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system wingeneric/generic with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */