From 4d6b9ced78cb474bf17a938b30e14bb5b994a0c0 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 31 Mar 2008 06:38:27 +0000 Subject: [PATCH] closes #380. There is at least one ldap handle required to activate a workstation. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10073 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_workstationGeneric.inc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 875272ca1..8ee8282bc 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -4,6 +4,7 @@ class workgeneric extends plugin { /* Generic terminal attributes */ var $gotoMode= "locked"; + var $initial_gotoMode= "locked"; var $gotoSyslogServer= ""; var $gotoSyslogServers= array(); var $gotoNtpServer= array(); @@ -146,6 +147,8 @@ class workgeneric extends plugin $this->gotoSyslogServers[$server] = $visible; } + $this->initial_gotoMode = $this->gotoMode; + /* Save 'dn' for later referal */ $this->orig_dn= $this->dn; } @@ -409,7 +412,16 @@ class workgeneric extends plugin { /* Call common method to give check the hook */ $message= plugin::check(); - + + /* Only systems with a valid ldap handle can be activated + */ + if($this->gotoMode == "active" && $this->initial_gotoMode != "active"){ + + if(isset($this->parent->by_object['workstartup']) && !count($this->parent->by_object['workstartup']->gotoLdapServers)){ + $message[] = _("In order to activate this system a valid ldap handle is required, please select at least one ldap URI in the workstation startup tab."); + } + } + /* Skip IP & Mac checks if this is a template */ if($this->cn != "wdefault"){ $message= array_merge($message, $this->netConfigDNS->check()); -- 2.30.2