summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39dbf63)
raw | patch | inline | side by side (parent: 39dbf63)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Jan 2007 04:12:26 +0000 (04:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Jan 2007 04:12:26 +0000 (04:12 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5542 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_termDNS.inc | patch | blob | history | |
plugins/admin/systems/class_terminalGeneric.inc | patch | blob | history | |
plugins/admin/systems/network.tpl | patch | blob | history |
index a62eaaedaf2f0e13f81532cb3ef81f714a471946..4b2cd52b9b6048b2952324c9da1c8d947d960961 100644 (file)
/* Assign smarty all non DNs attributes */
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
$smarty->assign("staticAddress","<font class=\"must\">*</font>");
/* Assign smarty all non DNs attributes */
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
/* Assign smarty all DNS attributes */
foreach($this->DNSattributes as $attr){
$smarty->assign($attr,$this->dnsEntry[$attr]);
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
/* Assign all needed vars */
+ $smarty->assign("DNSaccountACL",chkacl($this->acl,"termDNS"));
+
$smarty->assign("DNSAccount",$this->DNS_is_account);
$smarty->assign("Zones",$this->Zones);
$smarty->assign("ZoneKeys",($this->Zones));
/* Save all posted vars */
plugin::save_object();
- /* Ge all non dns attributes (IP/MAC)*/
- foreach($this->attributes as $attr){
- if(isset($_POST[$attr])){
- $this->$attr = $_POST[$attr];
- }
- }
-
/* Get dns attributes */
- if(($this->DNSenabled) && (isset($_POST['network_tpl_posted']))){
+ if(($this->DNSenabled) && (isset($_POST['network_tpl_posted'])) && chkacl($this->acl,"termDNS") == ""){
/* Check for posted record changes */
if(is_array($this->dnsEntry['RECORDS'])){
/* Add || Update new DNS entries
*/
+ print_a($tmp);
foreach($tmp['add'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->cat($dn, array('dn'));
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 7a12d4ef91850ea358a49027ec11c368992167cc..cb446b8792d3873e996c9e2242871072d9a3f1c5 100644 (file)
/* Call parent execute */
plugin::execute();
+ $this->netConfigDNS->acl = $this->acl;
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
}
- if (isset($_POST['action'])){
-
+ if (isset($_POST['action']) && chkacl($this->acl,"FAIstate") ==""){
if($this->fai_activated && $this->dn != "new"){
/* Set FAIstate */
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
+ if(preg_match("/^chooseBase/",$name) && $once && chkacl($this->acl,"base") == ""){
$once = false;
$this->dialog = new baseSelectDialog($this->config);
$this->dialog->setCurrentBase($this->base);
}
/* Add new ntp Server to our list */
- if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){
+ if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && chkacl($this->acl,"gotoNtpServer")== ""){
$this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers'];
}
/* Delete selected NtpServer for list of used servers */
- if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){
+ if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && chkacl($this->acl,"gotoNtpServer")== ""){
foreach($_POST['gotoNtpServerSelected'] as $name){
unset($this->gotoNtpServer[$name]);
}
function remove_from_parent()
{
+ $this->netConfigDNS->acl = $this->acl;
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$ldap->cat($this->dn, array('dn'));
/* Save to LDAP */
function save()
{
+ $this->netConfigDNS->acl = $this->acl;
/* Move object if requested */
if( $this->orig_dn != 'new' && $this->dn != $this->orig_dn){
index dcb3d45210490e3a04ec8090dd85a58e1dc3bb61..f3b68830ce6063e1b3774d68558de663e0d6e985 100644 (file)
<table summary="">
<tr>
<td><LABEL for="ipHostNumber">{t}IP-address{/t}{if $IPisMust}{$staticAddress}{/if}</LABEL></td>
- <td><input id="ipHostNumber" name="ipHostNumber" size=25 maxlength=80 value="{$ipHostNumber}"></td>
+ <td><input id="ipHostNumber" name="ipHostNumber" size=25 maxlength=80 value="{$ipHostNumber}" {$ipHostNumberACL}></td>
</tr>
<tr>
<td><LABEL for="macAddress">{t}MAC-address{/t}</LABEL>{$staticAddress}</td>
- <td><input name="macAddress" id="macAddress" size=25 maxlength=80 value="{$macAddress}"></td>
+ <td><input name="macAddress" id="macAddress" size=25 maxlength=80 value="{$macAddress}" {$macAddressACL}></td>
</tr>
{if $autonet==true}
<tr>
<td> </td>
- <td><input type="submit" name="autonet" value="{t}Autodetect{/t}"></td>
+ <td><input type="submit" name="autonet" value="{t}Autodetect{/t}"
+ {if ($ipHostNumberACL !="" || $macAddressACL!= "")} disabled {/if}></td>
</tr>
{/if}
</table>
</td>
{if $DNS_is_account==true}
<td style="width:50%;vertical-align:top;border-left:1px solid #b0b0b0;" valign="top">
- <input type="checkbox" name="enableDNS" value="1"
+ <input type="checkbox" name="enableDNS" value="1" {$DNSaccountACL}
{if $DNSAccount == true}checked="checked"
onclick="toggle('test2');
changeState('zoneName');
"/>
{/if}
{t}Enable DNS for this device{/t}
- <input type="submit" name="reloadThisDNSStuff" value="{t}Refresh{/t}"/>
+ <input type="submit" name="reloadThisDNSStuff" value="{t}Refresh{/t}" {$DNSaccountACL}/>
{if $DNSAccount == true}
<div style="padding-left:20px;visibility:visible;" id="test2">
{else}
<tr>
<td><LABEL for="zoneName">{t}Zone{/t}</LABEL></td>
<td>
- <select name="zoneName" id="zoneName" {if $DNSAccount == false} disabled='disabled' {/if}>
+ <select name="zoneName" id="zoneName" {if $DNSAccount == false} disabled='disabled' {/if} {$zoneNameACL}>
{html_options values=$ZoneKeys output=$Zones selected=$zoneName}
</select>
</td>
</tr>
<tr>
<td>{t}TTL{/t}</td>
- <td><input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" {if $DNSAccount == false} disabled='disabled' {/if}>
+ <td><input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" {if $DNSAccount == false} disabled='disabled' {/if} {$dNSTTLACL}>
</td>
</tr>
<tr>