Code

Fixed kerberos
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 05:12:42 +0000 (05:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 Jun 2006 05:12:42 +0000 (05:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3693 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_goKrbServer.inc
plugins/admin/systems/goKrbServer.tpl

index 34dd98309bf6bd40a1cfe7334fca303095048119..f2637b541a964d878fab1305ac92c6418877207f 100644 (file)
@@ -115,15 +115,16 @@ class goKrbServer extends plugin{
   function check()
   { 
     $message = plugin::check();
-    foreach (array("goKrbAdmin", "goKrbRealm") as $attr){
-        if ($this->$attr == "" || preg_match("/ /", $this->$attr)){
-          $message[]= sprintf(_("The attribute '%s' is empty or contains invalid characters."), $attr);
-        }
-      }
-      /* goKrbPassword is a must field, if goKrbServer is used as objectClass */
-      if ($this->goKrbPassword == "" ){
-        $message[]= sprintf(_("The specified kerberos password is empty."), $attr);
-      }
+    /* goKrbPassword is a must field, if goKrbServer is used as objectClass */
+    if (empty($this->goKrbPassword)){
+      $message[]= sprintf(_("The specified kerberos password is empty."), $attr);
+    }
+    if (empty($this->goKrbAdmin)){
+      $message[]= sprintf(_("The specified kerberos admin is empty."), $attr);
+    }
+    if (empty($this->goKrbRealm)){
+      $message[]= sprintf(_("The specified kerberos realm is empty."), $attr);
+    }
 
     return($message);
   }
index 8227b54b917a6e78967cb107798105e6f384941f..ed20b8a87456105243dc8cb390749a5cafb63f8d 100644 (file)
@@ -1,15 +1,15 @@
 <h2><img class="center" alt="" align="middle" src="images/rightarrow.png" /> {t}Kerberos kadmin access{/t}</h2>
   <table summary="">
     <tr>
-     <td>{t}Kerberos Realm{/t}</td>
+     <td>{t}Kerberos Realm{/t}{$must}</td>
      <td><input name="goKrbRealm" id="goKrbRealm" size=30 maxlength=60 {$goKrbRealmACL} value="{$goKrbRealm}"></td>
     </tr>
     <tr>
-     <td>{t}Admin user{/t}</td>
+     <td>{t}Admin user{/t}{$must}</td>
      <td><input name="goKrbAdmin" id="goKrbAdmin" size=30 maxlength=60 {$goKrbAdminACL} value="{$goKrbAdmin}"></td>
     </tr>
     <tr>
-     <td>{t}Password{/t}</td>
+     <td>{t}Password{/t}{$must}</td>
      <td><input type=password name="goKrbPassword" id="goKrbPassword" size=30 maxlength=60 {$goKrbPasswordACL} value="{$goKrbPassword}"></td>
     </tr>
    </table>