diff options
author | Adrian Lang <lang@cosmocode.de> | 2010-05-17 11:05:23 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2010-05-17 11:06:52 +0200 |
commit | de4d479af254512700b8aedce9c1a597880322b0 (patch) | |
tree | 029cc84cc1f75155f925c4bde3137e6a8f821533 /inc/confutils.php | |
parent | 8a6e9b060334bab4d8d2ddcbdb4de32241c7f7e1 (diff) | |
download | rpg-de4d479af254512700b8aedce9c1a597880322b0.tar.gz rpg-de4d479af254512700b8aedce9c1a597880322b0.tar.bz2 |
Let actionOK detect auth backend capabilities
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 7850682ba..0c1c0c64a 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,6 +241,7 @@ function actionOK($action){ static $disabled = null; if(is_null($disabled)){ global $conf; + global $auth; // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); @@ -250,6 +251,12 @@ function actionOK($action){ if(isset($conf['subscribers']) && !$conf['subscribers']) { $disabled[] = 'subscribe'; } + if (is_null($auth) || !$auth->canDo('addUser')) { + $disabled[] = 'register'; + } + if (is_null($auth) || !$auth->canDo('modPass')) { + $disabled[] = 'resendpwd'; + } $disabled = array_unique($disabled); } |