Code

Updated Winstation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Oct 2008 11:31:41 +0000 (11:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Oct 2008 11:31:41 +0000 (11:31 +0000)
-Added ACLs, but somehow the renaming and moving of winstations doesn't work.

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

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

index 3a80f52b602b6bf0a91e97edbdb6d11178acb217..63e20f21b88e08c301ac994e20d07ccb1872b170 100644 (file)
@@ -51,6 +51,7 @@ class wingeneric extends plugin
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
     $this->netConfigDNS->objectclasses=array("ipHost","ieee802Device");
     $this->netConfigDNS->MACisMust = FALSE;
+    $this->netConfigDNS->IPisMust = TRUE;
 
     /* Set base */
     if ($this->dn == "new"){
@@ -76,6 +77,7 @@ class wingeneric extends plugin
     $this->netConfigDNS->set_acl_base($base);
   }
 
+
   function set_acl_category($cat)
   {
     plugin::set_acl_category($cat);
@@ -134,7 +136,12 @@ class wingeneric extends plugin
 
     /* Fill templating stuff */
     $smarty= get_smarty();
-    $smarty->assign("bases", $this->config->idepartments);
+    $smarty->assign("bases"   , $this->get_allowed_bases());
+    
+    $tmp = $this->plInfo();
+    foreach($tmp['plProvidedAcls'] as $name => $translated){
+      $smarty->assign($name."ACL",$this->getacl($name));
+    }
 
     /* Assign attributes */
     foreach ($this->attributes as $attr){
@@ -303,7 +310,8 @@ class wingeneric extends plugin
           "plCategory"    => array("winworkstation" => array("description"  => _("Win workstation"),
                                                           "objectClass"  => "gotoWorkstation")),
           "plProvidedAcls"=> array(
-            "cn"                  => _("Workstation name"),
+            "cn"                  => _("Name"),
+            "base"                => _("Base"),
             "description"         => _("Description"))
           ));
   }
index 4363196bad2f1044b7c441e6532c27cf76287a20..d7ac659c46faa055520fe5522eacbc268e20c00e 100644 (file)
@@ -4,7 +4,11 @@
        <table summary="">
         <tr>
          <td><LABEL for="cn">{t}Machine name{/t}</LABEL>{$must}</td>
-         <td><input id="cn" name="cn" size=20 maxlength=60 value="{$cn}"></td>
+         <td>
+{render acl=$cnACL}
+                       <input id="cn" name="cn" size=20 maxlength=60 value="{$cn}">
+{/render}
+         </td>
         </tr>
         <tr>
           <td colspan=2>&nbsp;</td>
         <tr>
          <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
          <td>
-          <select size="1" id="base" name="base" title="{t}Choose subtree to place terminal in{/t}">
-           {html_options options=$bases selected=$base_select}
-          </select>
-               <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+{render acl=$baseACL}
+      <select id="base" size="1" name="base" title="{t}Choose subtree to place group in{/t}">
+       {html_options options=$bases selected=$base_select}
+      </select>
+{/render}
+
+{render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
+        <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+{/render}
+          </td>
          </tr>
        </table>
   </td>
        <table summary="">
         <tr>
          <td><LABEL for="description">{t}Description{/t}</LABEL></td>
-         <td><input id="description" name="description" size=25 maxlength=80 value="{$description}"></td>
+         <td>
+{render acl=$descriptionACL}
+               <input id="description" name="description" size=25 maxlength=80 value="{$description}">
+{/render}
+         </td>
         </tr>
        </table>
   </td>