diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 5d020a17d81bf907cebd9474239f7bce6aab7c57..02e5b7ea0c81668b990c35aacdbff524795c686c 100644 (file)
class workstartup extends plugin
{
class workstartup extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage terminal startup options";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* Generic terminal attributes */
var $bootmode = "G";
var $goLdapServerList = array();
/* Generic terminal attributes */
var $bootmode = "G";
var $goLdapServerList = array();
var $FAIServRepConfig = array();
var $fai_activated = FALSE;
var $FAIServRepConfig = array();
var $fai_activated = FALSE;
+ var $member_of_ogroup = FALSE;
function workstartup ($config, $dn= NULL, $parent= NULL)
{
function workstartup ($config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
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.
*/
/* Creating a list of valid Mirrors
* none will not be saved to ldap.
*/
['PACKAGES'][0] "pkg1";
['PACKAGES'][1] "postfix";
*/
['PACKAGES'][0] "pkg1";
['PACKAGES'][1] "postfix";
*/
-
- $ldap->search("(&(FAIrepository=*)(objectClass=FAIrepositoryServer))",array("FAIrepository"));
+ $filter= "";
+ $ui= get_userinfo();
+ if (isset($config->current['STRICT_UNITS']) && preg_match('/TRUE/i', $config->current['STRICT_UNITS']) && $ui->gosaUnitTag != ""){ $filter= "(gosaUnitTag=".$ui->gosaUnitTag.")";
+ } $ldap->search("(&(FAIrepository=*)(objectClass=FAIrepositoryServer)$filter)",array("FAIrepository"));
$test = array();
while($attr = $ldap->fetch()){
if(isset($attr['FAIrepository'])){
$test = array();
while($attr = $ldap->fetch()){
if(isset($attr['FAIrepository'])){
/* Load hardware list */
/* 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");
if($this->fai_activated){
$map= array("gotoLdapServer","FAIclass","FAIdebianMirror","gotoBootKernel");
$this->gotoBootKernel= "default";
}
$this->gotoBootKernel= "default";
}
- if(count($this->FAIclass)==0 && $this->FAIrelease == ""){
- $this->FAIdebianMirror = "inherited";
- }
}
}
$use = " checked ";
};
$use = " checked ";
};
+ $use .= chkacl($this->acl,"gotoLdapServer");
+
$display = $server;
$SelectBoxLdapServer->AddEntry(
$display = $server;
$SelectBoxLdapServer->AddEntry(
function getFAIdebianMirrors()
{
$ret = array();
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();
$ret['auto']=_("automatic");
$secs = array();