Code

Added possibility to add a kerberos dialog
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Oct 2007 16:29:09 +0000 (16:29 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 15 Oct 2007 16:29:09 +0000 (16:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7560 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_password-methods-heimdal.inc
include/class_password-methods.inc
plugins/personal/generic/class_user.inc
plugins/personal/generic/generic.tpl

index 4a83d26b2d3ab6c38abfefabd6b3bc8e241c9e38..f136aa6e02dc309af4fb8ded2a32722446f21b9f 100644 (file)
@@ -66,6 +66,19 @@ class passwordMethodheimdal extends passwordMethod
     }
     return "$mode";
   }
+
+
+  function is_configurable()
+  {
+    return TRUE;
+  }
+
+
+  function configure()
+  {
+    echo "Show dialog";
+  }
+
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index f4a3c0b7291a6ec4a88f0814d67a91d74cc20309..9696df66d7a2994d09a8379d586fcc76a6904a1e 100644 (file)
@@ -106,6 +106,20 @@ class passwordMethod
   }
 
 
+  // Return true if this password method provides a configuration dialog
+  function is_configurable()
+  {
+    return FALSE;
+  }
+
+
+  // Provide a subdialog to configure a password method
+  function configure()
+  {
+    return "";
+  }
+
+
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>
index bdf1c69d819a3aa35e6ccb8dde826b77b957953e..0171a3c1117b86ea88acdc359cce507e79d11c33 100644 (file)
@@ -527,6 +527,8 @@ class user extends plugin
 
     $temp= passwordMethod::get_available_methods();
     $hashes = $temp['name'];
+    $test= new $temp[$this->pw_storage]($this->config);
+    $is_configurable= $test->is_configurable();
     
     /* Load attributes and acl's */
     $ui =get_userinfo();
@@ -542,6 +544,7 @@ class user extends plugin
 
     $smarty->assign("pwmode", $hashes);
     $smarty->assign("pwmode_select", $this->pw_storage);
+    $smarty->assign("pw_configurable", $is_configurable);
     $smarty->assign("passwordStorageACL", $this->getacl("userPassword",(!is_object($this->parent) && !isset($_SESSION['edit']))));
     $smarty->assign("base_select",      $this->base);
     $smarty->assign("CertificatesACL",  $this->getacl("Certificate",(!is_object($this->parent) && !isset($_SESSION['edit']))));
index f74986c4b02f77b245faf8394fe70101d4f2c2d3..917aad0e417ff73428cae9d65e5931265bfc935a 100644 (file)
              <select size="1" id="pw_storage" name="pw_storage">
               {html_options values=$pwmode output=$pwmode selected=$pwmode_select}
              </select>
+       {if $pw_configurable eq "true"}
+             &nbsp; <input id="edit_pw_method" type="submit" name="edit_pw_method" value="{t}Configure{/t}...">
+       {/if}
        {/render}
      </td>
     </tr>
        {/render}
      </td>
     </tr>
-<!--
-    <tr>
-     <td><label for="edit_krb">{t}Kerberos{/t}</label></td>
-     <td>
-       no acls
-               <input id="edit_krb" type="submit" name="edit_krb" disabled value="{t}Edit properties{/t}...">
-     </td>
-    </tr>
--->
     {/if}
 
    </table>