summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfdd598)
raw | patch | inline | side by side (parent: dfdd598)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jul 2007 09:25:37 +0000 (09:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jul 2007 09:25:37 +0000 (09:25 +0000) |
NTP service / FAI startup settings / Root server / Ldap Base
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6904 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6904 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 598e4fbd458661620d032c2ceb3cde3c37e12922..8f5b2fde36ddd6d039ea9d91067b3dbbf20ec047 100644 (file)
$this->gotoNtpServer=array();
}
+ /* You can't inherit the NTP service, if we are not member in an object group */
+ if(!$this->member_of_ogroup){
+ $this->inheritTimeServer = FALSE;
+ }
+
/* Create available ntp options */
$this->gotoNtpServers = $this->config->data['SERVERS']['NTP'];
foreach($this->gotoNtpServers as $key => $server){
$tmp = $this->config->data['SERVERS']['SYSLOG'];
foreach($tmp as $server){
$visible = $server;
- if($server == "default") {
+ if($server == "default" && $this->member_of_ogroup) {
$visible = "["._("inherited")."]";
}
$this->gotoSyslogServers[$server] = $visible;
if($server != "default"){
$tmp2[$server]= $server;
}else{
- $tmp2[$server]="["._("inherited")."]";
+ if($this->member_of_ogroup){
+ $tmp2[$server]="["._("inherited")."]";
+ }
}
}
}
if(isset($_POST['termgeneric_posted']) && chkacl($this->acl,"gotoNtpServer") == ""){
- if(isset($_POST["inheritTimeServer"])){
+ if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
$this->inheritTimeServer = true;
}else{
$this->inheritTimeServer = false;
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 5863ed5f41c22654c80f5294cffe02b261b3c7f6..78f22f96954febdee43737a22c54c84268fd92c6 100644 (file)
$this->gotoNtpServer=array();
}
+ /* You can't inherit the NTP service, if we are not member in an object group */
+ if(!$this->member_of_ogroup){
+ $this->inheritTimeServer = FALSE;
+ }
+
/* Create available ntp options */
$tmp = $this->config->data['SERVERS']['NTP'];
$this->gotoNtpServers = array();
$tmp = $this->config->data['SERVERS']['SYSLOG'];
foreach($tmp as $server){
$visible = $server;
- if($server == "default") {
+ if($server == "default" && $this->member_of_ogroup) {
$visible = "["._("inherited")."]";
}
$this->gotoSyslogServers[$server] = $visible;
/* Set inherit mode */
if(isset($_POST['workgeneric_posted']) && chkacl($this->acl,"gotoNtpServer") == ""){
- if(isset($_POST["inheritTimeServer"])){
+ if(isset($_POST["inheritTimeServer"]) && $this->member_of_ogroup){
$this->inheritTimeServer = true;
}else{
$this->inheritTimeServer = false;
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index be645996ff75d16e02a3f86fc9d94eb84cca98f3..02e5b7ea0c81668b990c35aacdbff524795c686c 100644 (file)
var $FAIServRepConfig = array();
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
function workstartup ($config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
+ if(!isset($this->parent->by_object['ogroup'])){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd ($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn"));
+ $this->member_of_ogroup = $ldap->count() >= 1;
+ }
+
/* Creating a list of valid Mirrors
* none will not be saved to ldap.
*/
/* Load hardware list */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
- if ($ldap->count() == 1){
+ if ($this->member_of_ogroup){
+ if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
+ $this->FAIdebianMirror = "inherited";
+ }
if($this->fai_activated){
$map= array("gotoLdapServer","FAIclass","FAIdebianMirror","gotoBootKernel");
$this->gotoBootKernel= "default";
}
- if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
- $this->FAIdebianMirror = "inherited";
- }
}
function getFAIdebianMirrors()
{
$ret = array();
- $ret['inherited']="["._("inherited")."]";
+
+ /* Only add inherit option, if we are part in an object group
+ */
+ if($this->member_of_ogroup) {
+ $ret['inherited']="["._("inherited")."]";
+ }
+
$ret['auto']=_("automatic");
$secs = array();
index 76a7471a379bc104386b3e9f68f13a7fb156573e..684fdbe6fc2eade03d25eafdd944ffbeea7c398a 100644 (file)
<table width="100%">
<tr>
<td colspan="2">
+{if $member_of_ogroup}
<input type="checkbox" value="1" name="inheritTimeServer" {$gotoNtpServerACL}
{if $inheritTimeServer } checked {/if}
onClick="javascript:
changeState('gotoNtpServers');
changeState('addNtpServer');
changeState('delNtpServer');">{t}Inherit time server attributes{/t}
+{else}
+ <input disabled type='checkbox' name='option_disabled'>{t}Inherit time server attributes{/t}
+{/if}
</td>
</tr>
<tr>
index cb84f1a1fdbafd64ebd6f0920167f11c9bab9ca7..653cb724bbd1fbb49bf962f11d9ace118b949303 100644 (file)
<table width="100%">
<tr>
<td colspan="2">
+
+{if $member_of_ogroup}
+
<input type="checkbox" value="1" name="inheritTimeServer" {$gotoNtpServerACL}
{if $inheritTimeServer } checked {/if}
onClick="javascript:
changeState('gotoNtpServers');
changeState('addNtpServer');
changeState('delNtpServer');">{t}Inherit time server attributes{/t}
+{else}
+ <input disabled type='checkbox' name='option_disabled'>{t}Inherit time server attributes{/t}
+{/if}
</td>
</tr>
<tr>