From cd52f92def16e676c2458a32d2b8c8f8a7839f06 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 25 Jan 2006 01:01:25 +0100 Subject: oo auth update - remove legacy auth remnants, add auth->canDo darcs-hash:20060125000125-9b6ab-9853f11e04d8ea93235317fa8137cef079eb2641.gz --- inc/auth/basic.class.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'inc/auth/basic.class.php') diff --git a/inc/auth/basic.class.php b/inc/auth/basic.class.php index f39a9c392..9ea1a598b 100644 --- a/inc/auth/basic.class.php +++ b/inc/auth/basic.class.php @@ -5,13 +5,26 @@ * foundation authorisation class * all auth classes should inherit from this class * - * @author Chris Smith + * @author Chris Smith */ class auth_basic { var $success = true; + /** + * Constructor + * + * Carry out sanity checks to ensure the object is + * able to operate. + * + * Set $this->success to false if checks fail + * + * @author Christopher Smith + */ +# function auth_basic() { +# } + /** * Do all authentication [ OPTIONAL ] * @@ -60,6 +73,17 @@ class auth_basic { # return true; # } + /** + * Check if authorisation mechanism supports fn and + * that fn will operate in the current environment + * + * @author Christopher Smith + * @return bool + */ + function canDo($fn) { + return method_exists($this, $fn); + } + /** * Check user+password [ MUST BE OVERRIDDEN ] * -- cgit v1.2.3