Code

Added intial dns acls.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 10:21:04 +0000 (10:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Jul 2008 10:21:04 +0000 (10:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11743 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc
gosa-plugins/dns/admin/systems/services/dns/servdnseditzone.tpl

index 08b15e808ae396d6fdef6e679b6d5a57e33838e1..93d5db4d0c2361cc6c72362239962635505b91f3 100644 (file)
@@ -111,7 +111,7 @@ class servdns extends goService
      */
     $smarty= get_smarty();
     $smarty->assign("dns_take_over",FALSE);
-    $smarty->assign("is_createable",$this->acl_is_createable());
+    $smarty->assign("is_createable",$this->acl_is_writeable(""));
     $display= "";
 
 
@@ -584,6 +584,7 @@ class servdns extends goService
           "plProvidedAcls"=> array(
             "zoneName"      =>_("Zone name"),
             "ReverseZone"   =>_("Reverse zone"),
+            "NetworkClass"  =>_("Network class"),
             "sOAprimary"    =>_("Primary dns server"),
             "sOAmail"       =>_("Mail address"),
             "sOAserial"     =>_("Serial"),
@@ -591,6 +592,7 @@ class servdns extends goService
             "sOAretry"      =>_("Retry"),
             "sOAexpire"     =>_("Expire"),
             "sOAttl"        =>_("TTL"),
+            "mXRecord"      =>_("MX records"),
             "zoneRecords"   =>_("Zone records"))
     ));
   }
index 2123d3cda4bbe04a41a27b9e89678f59276114b2..927b22895dfd4be339f05fd6f435d07808f82f3b 100644 (file)
@@ -212,7 +212,14 @@ class servdnseditZone extends plugin
     $smarty->assign("Zone_is_used",$this->Zone_is_used);
     $ui = get_userinfo();
 
-    $smarty->assign("ACLs",$this->parent->getacl(""));
+    /* Assign ACLs 
+        All acls are defined in our parent class.
+     */
+    $tmp = $this->parent->plInfo();
+    foreach($tmp['plProvidedAcls'] as $name => $desc){
+      $smarty->assign($name."ACL", $this->parent->getacl($name));
+    }
+  
     $display= "";
 
     /* Open Zone Entry Edit Dialog
index fa8aba6cc901a121eeaacb0ecd13da35acbbd7a9..fb947b41fc5f0c416bd62d2d0dd60943a5a53ef4 100644 (file)
@@ -7,7 +7,7 @@
                                        <td style='vertical-align:top'>{t}Zone name{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$zoneNameACL}                                      
                                                <input type="text" name="zoneName" value="{$zoneName}" {if $NotNew | $Zone_is_used} disabled {/if}>
 {/render}
                                        </td>
@@ -16,7 +16,7 @@
                                        <td style='vertical-align:top'>{t}Network address{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$ReverseZoneACL}                                   
                                                <input type="text" name="ReverseZone" value="{$ReverseZone}" {if $NotNew | $Zone_is_used} disabled {/if}>
 {/render}
                                        </td>
@@ -25,7 +25,7 @@
                                        <td>{t}Netmask{/t}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$NetworkClassACL}                                  
                                                <select name="NetworkClass" {if $NotNew | $Zone_is_used} disabled {/if}>
                                                        {html_options options=$NetworkClasses selected=$NetworkClass }
                                                </select>
@@ -52,9 +52,7 @@
                                                {/if}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
                                                <input type="submit" name="EditZoneEntries" value="{t}Edit{/t}" {if $AllowZoneEdit == false} disabled {/if}> 
-{/render}
                                        </td>
                                </tr>
                        </table>
@@ -71,7 +69,7 @@
                                        <td>{t}Primary dns server for this zone{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAprimaryACL}                                    
                                                <input type="text" name="sOAprimary" value="{$sOAprimary}">
 {/render}
                                        </td>
@@ -80,7 +78,7 @@
                                        <td>{t}Mail address{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAmailACL}                                       
                                                <input type="text" name="sOAmail" value="{$sOAmail}">
 {/render}
                                        </td>
@@ -89,7 +87,7 @@
                                        <td>{t}Serial number (automatically incremented){/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAserialACL}                                     
                                                <input type="text" name="sOAserial" value="{$sOAserial}">
 {/render}
                                        </td>
                                        <td>{t}Refresh{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOArefreshACL}                                    
                                                <input type="text" name="sOArefresh" value="{$sOArefresh}">
 {/render}
                                        </td>
                                        <td>{t}Retry{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAretryACL}                                      
                                                <input type="text" name="sOAretry" value="{$sOAretry}">
 {/render}
                                        </td>
                                        <td>{t}Expire{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAexpireACL}                                     
                                                <input type="text" name="sOAexpire" value="{$sOAexpire}">
 {/render}
                                        </td>
                                        <td>{t}TTL{/t}{$must}
                                        </td>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$sOAttlACL}                                        
                                                <input type="text" name="sOAttl" value="{$sOAttl}">
 {/render}
                                        </td>
                        <table width="100%">    
                                <tr>
                                        <td>
-{render acl=$ACLs}                                     
+{render acl=$mXRecordACL}                                      
                                                {$Mxrecords}
 {/render}
-{render acl=$ACLs}                                     
+{render acl=$mXRecordACL}                                      
                                                <input type="text"              name="StrMXRecord" value="">
 {/render}
-{render acl=$ACLs}                                     
+{render acl=$mXRecordACL}                                      
                                                <input type="submit"    name="AddMXRecord" value="{msgPool type=addButton}">
 {/render}
                                        </td>
                </td>
                <td style="vertical-align:top;">
                        <h2>{t}Global zone records{/t}</h2>
-{render acl=$ACLs}                                     
+{render acl=$zoneRecordsACL}                                   
                          {$records}
 {/render}
                </td>
 </table>
 <div style="text-algin:right;" align="right">
        <p>
-{render acl=$ACLs}                                     
                <input type="submit" name="SaveZoneChanges" value="{msgPool type=saveButton}">
-{/render}
                <input type="submit" name="CancelZoneChanges" value="{msgPool type=cancelButton}">
        </p>
 </div>