From: hickert Date: Thu, 18 Sep 2008 11:36:12 +0000 (+0000) Subject: Updated Workstations X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aad69954170836adc2258b0701a1f579600dfec1;p=gosa.git Updated Workstations -Do not inherit attributes, whcih we are not allowed to write. -Fixed problem with AutoSync ACLs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12502 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 0be3299ab..2b2b8d5e5 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -712,6 +712,7 @@ class workgeneric extends plugin "gotoSyslogServer" => _("Syslog server"), "gotoNtpServer" => _("Ntp server"), "gotoRootPasswd" => _("Root password"), + "createFAICD" => _("Create FAI CD"), "FAIstate" => _("Action flag")) )); } @@ -725,18 +726,26 @@ class workgeneric extends plugin if($this->member_of_ogroup && isset($this->parent->by_object['workservice'])){ foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant", "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){ - $this->parent->by_object['workservice']->$name = "default"; + if($this->parent->by_object['workservice']->acl_is_writeable($name)){ + $this->parent->by_object['workservice']->$name = "default"; + } } } /* Set workstation startup attributes to inherited */ if($this->member_of_ogroup && isset($this->parent->by_object['workstartup'])){ - $this->parent->by_object['workstartup']->gotoBootKernel = "default-inherited"; - $this->parent->by_object['workstartup']->gotoLdapServer = "default-inherited"; - $this->parent->by_object['workstartup']->FAIdebianMirror= "inherited"; - - $this->parent->by_object['workstartup']->gotoLdap_inherit = TRUE; - $this->parent->by_object['workstartup']->gotoLdapServers = array(); + $obj = $this->parent->by_object['workstartup']; + if($obj->acl_is_writeable("gotoBootKernel")){ + $this->parent->by_object['workstartup']->gotoBootKernel = "default-inherited"; + } + if($obj->acl_is_writeable("gotoLdapServer")){ + $this->parent->by_object['workstartup']->gotoLdapServer = "default-inherited"; + $this->parent->by_object['workstartup']->gotoLdap_inherit = TRUE; + $this->parent->by_object['workstartup']->gotoLdapServers = array(); + } + if($obj->acl_is_writeable("FAIdebianMirror")){ + $this->parent->by_object['workstartup']->FAIdebianMirror= "inherited"; + } } } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index 942c329be..e3454ea98 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -359,7 +359,7 @@ class workservice extends plugin { plugin::save_object(); - if((isset($_POST['gotoXDriver'])) && $this->acl_is_writeable("AutoSync")) { + if((isset($_POST['workservicePosted'])) && $this->acl_is_writeable("AutoSync")) { if(isset($_POST['AutoSync'])){ $this->AutoSync = true; }else{ diff --git a/gosa-plugins/goto/admin/systems/goto/workstationService.tpl b/gosa-plugins/goto/admin/systems/goto/workstationService.tpl index e5caf3ebc..1016af926 100644 --- a/gosa-plugins/goto/admin/systems/goto/workstationService.tpl +++ b/gosa-plugins/goto/admin/systems/goto/workstationService.tpl @@ -210,7 +210,7 @@ - +