From: opensides Date: Thu, 23 Aug 2007 09:41:08 +0000 (+0000) Subject: - Added the check method for ssh plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9a4f2f2605c01ca56e836cfa74085aea9ffc8473;p=gosa.git - Added the check method for ssh plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7122 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servSsh.inc b/plugins/admin/systems/class_servSsh.inc index 7b9edeca7..1037fb4d4 100644 --- a/plugins/admin/systems/class_servSsh.inc +++ b/plugins/admin/systems/class_servSsh.inc @@ -124,11 +124,9 @@ class servssh extends plugin $ldap->cd($this->dn); $this->cleanup(); -// $this->attrs['sshPublicKey']=""; - $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing SSH account failed")); + show_ldap_error($ldap->get_error(), _("Removing SSH key failed")); /* Optionally execute a command after we're done */ // $this->handle_post_events('remove',array("uid" => $this->uid)); @@ -141,6 +139,20 @@ class servssh extends plugin plugin::save_object(); } + /* Check values */ + function check() + { + /* Call common method to give check the hook */ + $message = plugin::check(); + + /* Check for empty or not */ + if(empty($this->sshPublicKey)){ + $message[]= _("Value specified as 'SSH Key' is not valid."); + } + + return($message); + } + /* Save to LDAP */ function save() { @@ -175,23 +187,5 @@ class servssh extends plugin } - - /* Check values */ - function check() - { - /* Call common method to give check the hook */ - $message= plugin::check(); - - /* Check for positive integer values */ - /* if ($this->is_account){ - if ((!is_id($this->sshPublickey))&&(chkacl($this->acl,"sshPublickey")=="")){ - $message[]= _("Value specified as 'SSH Key' is not valid."); - } - }*/ - - return $message; - } - - // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>