From dbd639c557c5b1d9844112803166373cead780c8 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 15 Oct 2007 16:29:09 +0000 Subject: [PATCH] Added possibility to add a kerberos dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7560 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_password-methods-heimdal.inc | 13 +++++++++++++ include/class_password-methods.inc | 14 ++++++++++++++ plugins/personal/generic/class_user.inc | 3 +++ plugins/personal/generic/generic.tpl | 12 +++--------- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/include/class_password-methods-heimdal.inc b/include/class_password-methods-heimdal.inc index 4a83d26b2..f136aa6e0 100644 --- a/include/class_password-methods-heimdal.inc +++ b/include/class_password-methods-heimdal.inc @@ -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: diff --git a/include/class_password-methods.inc b/include/class_password-methods.inc index f4a3c0b72..9696df66d 100644 --- a/include/class_password-methods.inc +++ b/include/class_password-methods.inc @@ -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: ?> diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index bdf1c69d8..0171a3c11 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -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'])))); diff --git a/plugins/personal/generic/generic.tpl b/plugins/personal/generic/generic.tpl index f74986c4b..917aad0e4 100644 --- a/plugins/personal/generic/generic.tpl +++ b/plugins/personal/generic/generic.tpl @@ -199,6 +199,9 @@ + {if $pw_configurable eq "true"} +   + {/if} {/render} @@ -212,15 +215,6 @@ {/render} - {/if} -- 2.30.2