Code

Updated systemlisting
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Sep 2008 12:12:19 +0000 (12:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Sep 2008 12:12:19 +0000 (12:12 +0000)
-Do not display create FAI button, if ACLs ware missing.
-Hide 'autonet' button. ACLs.

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

gosa-plugins/systems/admin/systems/class_divListSystem.inc
gosa-plugins/systems/admin/systems/class_termDNS.inc
gosa-plugins/systems/admin/systems/network.tpl

index 0251feb5559954f29493ced66affae7cfa16600f..732f8f6b1857aedff69207868aa6dcc18714bacf 100644 (file)
@@ -342,7 +342,10 @@ class divListSystem extends MultiSelectWindow
         $action2 = $empty;
       }
 
-      if(in_array("gotoWorkstation",$val['objectClass'])){
+      /* Add create FAI CD icon 
+       */
+      $acl_cd = preg_match("/w/",$ui->get_permissions($val['dn'],"workstation/workgeneric","createFAICD"));
+      if(in_array("gotoWorkstation",$val['objectClass']) && $acl_cd){
         $action2= "<input class='center' type='image' src='plugins/systems/images/cdrom.png' alt='"._("Create CD")."'   
                       name='gen_cd_%KEY%' title='"._("Create FAI CD")."'>&nbsp;".$action2;
       }else{
index 7d5ffc58edf7eb29bf55375a86bcfad4519799d5..58d9a23a2d59eb13417237478e2f3fb96a574d1f 100644 (file)
@@ -454,6 +454,8 @@ class termDNS extends plugin
       $smarty->assign("changeStateForRecords",$changeStateForRecords);
       $smarty->assign("staticAddress","<font class=\"must\">*</font>");
 
+      $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+
       $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
     }
 
index e93a3e088e1fb03bedd49f438e6ec2bde394d1df..6401258e4b6d613a67a362905f118202be5b6511 100644 (file)
 {render acl=$macAddressACL}
             <input     name="macAddress"       id="macAddress" size=25 maxlength=80    value="{$macAddress}">
 {/render}
+
+{render acl=$autonetACL}
            <input type="submit" name="autonet" value="{t}Autodetect{/t}">
+{/render}
           </td>
                                </tr>
         {if $dhcpEnabled}