From: hickert Date: Mon, 31 Mar 2008 06:38:27 +0000 (+0000) Subject: closes #380. There is at least one ldap handle required to activate a workstation. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4d6b9ced78cb474bf17a938b30e14bb5b994a0c0;p=gosa.git 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 --- 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());