From: hickert Date: Mon, 22 Mar 2010 09:07:53 +0000 (+0000) Subject: Updated dns service template and ACL checks .. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=26937dd2946eb6798d1ce72071411493d3af9cf2;p=gosa.git Updated dns service template and ACL checks .. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16980 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc index 6dc1ab6c6..8591519a2 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc @@ -197,6 +197,7 @@ class servdns extends goService $this->dialog = new servdnseditZone($this->config,$this->dn); if($this->is_new){ $this->dialog->acl_base = $this->acl_base; + $this->dialog->acl_category = $this->acl_category; } } @@ -211,6 +212,8 @@ class servdns extends goService $once =true; $tmp = postDecode(preg_replace("/^editZone_/","",$name)); $this->dialog= new servdnseditZone($this->config,$this->dn,$this->Zones[$tmp]); + $this->dialog->acl_base = $this->acl_base; + $this->dialog->acl_category = $this->acl_category; } /* check posts for delete zone @@ -229,7 +232,9 @@ class servdns extends goService if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id'])){ $id = postDecode($_GET['id']); if(isset($this->Zones[$id])){ - $this->dialog= new servdnseditZone($this->config,$this->dn,$this->Zones[$id]); + $this->dialog= new servdnseditZone($this->config,$this->dn,$this->Zones[$id]); + $this->dialog->acl_base = $this->acl_base; + $this->dialog->acl_category = $this->acl_category; } } @@ -237,6 +242,8 @@ class servdns extends goService $id = postDecode($_GET['id']); if(isset($this->Zones[$id])){ $this->dialog= new servdnseditZone($this->config,$this->dn,$this->Zones[$id]); + $this->dialog->acl_base = $this->acl_base; + $this->dialog->acl_category = $this->acl_category; } } diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc index 75024f308..29fad0544 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -620,6 +620,13 @@ class servdnseditZone extends plugin } + function acl_is_writeable($attribute,$skip_write = FALSE) + { + if($this->read_only) return(FALSE); + $ui= get_userinfo(); + return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category."servdns", $attribute, $skip_write)); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/gosa-plugins/dns/admin/systems/services/dns/servDNSeditZoneEntries.tpl b/gosa-plugins/dns/admin/systems/services/dns/servDNSeditZoneEntries.tpl index 9245db24c..800d9b382 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/servDNSeditZoneEntries.tpl +++ b/gosa-plugins/dns/admin/systems/services/dns/servDNSeditZoneEntries.tpl @@ -1,35 +1,29 @@ -

{t}This dialog allows you to configure all components of this DNS zone on a single list.{/t}

-
-{if $disableDialog} -
- {t}This dialog can't be used until the currently edited zone was saved or the zone entry exists in the ldap database.{/t} - -{else} -
- {$table} -
- {render acl=$acl} - +

{t}This dialog allows you to configure all components of this DNS zone on a single list.{/t} +

+
- {/render} +{if $disableDialog} +
+ {t}This dialog can't be used until the currently edited zone was saved or the zone entry exists in the ldap database.{/t} + {else} +
+ {$table} +
+ {render acl=$acl} + + {/render} + {/if} -
-

- {render acl=$acl} - - - {/render} - - -

+

+ {render acl=$acl} + + {/render} + +

- - - + \ No newline at end of file diff --git a/gosa-plugins/dns/admin/systems/services/dns/servdns.tpl b/gosa-plugins/dns/admin/systems/services/dns/servdns.tpl index 7d3aa9977..80e2dbf49 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/servdns.tpl +++ b/gosa-plugins/dns/admin/systems/services/dns/servdns.tpl @@ -13,8 +13,7 @@

-

- {t}Following objects will be taken over{/t} : +

{t}Following objects will be taken over{/t} :

@@ -37,31 +36,32 @@
      
     
    
+   
   {/if}
-
   
    
-    

{t}Zones{/t}

+

{t}Zones{/t} +

{$ZoneList} + {if $is_createable} - + {else} - + + {/if} - - + {/if} -
- - -
+ + + \ No newline at end of file