Code

Updated Workstations
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Sep 2008 11:36:12 +0000 (11:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 Sep 2008 11:36:12 +0000 (11:36 +0000)
-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

gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
gosa-plugins/goto/admin/systems/goto/workstationService.tpl

index 0be3299abe16d4e8d31f43b2f81d2d5585d56cd5..2b2b8d5e5ff469a260d69188478d64c0bbd72a37 100644 (file)
@@ -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";
+      }
     }
   }
 }
index 942c329beeb79a7f2d9756be0e79954ad20d775c..e3454ea98dd58a77c63af1628e154540b71c761f 100644 (file)
@@ -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{
index e5caf3ebc31cd1d09d77a68b4beb8bdff438f396..1016af92678d263b0c8a5d8149b3d8fdf8ff2779 100644 (file)
  </tr>
 </table>
 
-
+<input type='hidden' name='workservicePosted' value='1'>
 <div style="height:40px;"></div>
 
 <script language="JavaScript" type="text/javascript">