From 5f1f63cbff1a76de561e6e556342179ace8ca24e Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 12 Jul 2007 06:20:19 +0000 Subject: [PATCH] Systems Workstation Startup Added inherit all button. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6839 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 20 +++++++++++++++++++ plugins/admin/systems/workstationStartup.tpl | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index be645996f..837920e3e 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -32,6 +32,7 @@ class workstartup extends plugin var $customParameters = ""; var $orig_dn = ""; var $ignore_account = TRUE; + var $member_of_ogroup = FALSE; /* FAI class selection */ var $FAIclass = array(); @@ -65,6 +66,13 @@ class workstartup extends plugin 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. */ @@ -792,6 +800,8 @@ class workstartup extends plugin $smarty->assign($value."ACL", chkacl($this->acl, "$value")); } + $smarty->assign("member_of_ogroup",$this->member_of_ogroup); + /* Show main page */ return($smarty->fetch (get_template_path('workstationStartup.tpl', TRUE,dirname(__FILE__)))); } @@ -930,6 +940,9 @@ class workstartup extends plugin $this->customParameters= $_POST["customParameters"]; } + if(isset($_POST["inheritAll"])){ + $this->set_everything_to_inherited(); + } } @@ -1145,6 +1158,13 @@ class workstartup extends plugin return($ret); } + + function set_everything_to_inherited() + { + $this->gotoBootKernel = "default-inherited"; + $this->gotoLdapServer = "default-inherited"; + $this->FAIdebianMirror= "inherited"; + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl index 238784119..446d7475f 100644 --- a/plugins/admin/systems/workstationStartup.tpl +++ b/plugins/admin/systems/workstationStartup.tpl @@ -1,3 +1,7 @@ +{if $member_of_ogroup} + +{/if} +
-- 2.30.2