summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-03-07 17:51:27 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-03-07 17:51:27 +0100
commit60e6b550b60672fe78cdfeb0abafa4c16b1451c5 (patch)
treec98c5d5d4fd70963bf14e13c014db77c6f470e29
parent36223ba71e9350aa13c292b2cc8904d29bd929d6 (diff)
downloadrpg-60e6b550b60672fe78cdfeb0abafa4c16b1451c5.tar.gz
rpg-60e6b550b60672fe78cdfeb0abafa4c16b1451c5.tar.bz2
disable ACL commands if ACL is disabled FS#732
darcs-hash:20060307165127-7ad00-b11a8cab6d904745998d5648911bee9fcd55af61.gz
-rw-r--r--inc/actions.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/actions.php b/inc/actions.php
index eaf0c268e..e92e366d0 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -114,6 +114,7 @@ function act_dispatch(){
*/
function act_clean($act){
global $lang;
+ global $conf;
//handle localized buttons
if($act == $lang['btn_save']) $act = 'save';
@@ -127,6 +128,14 @@ function act_clean($act){
if($act == 'export_html') $act = 'export_xhtml';
if($act == 'export_htmlbody') $act = 'export_xhtmlbody';
+ //disable all acl related commands if ACL is disabled
+ if(!$conf['useacl'] && in_array($act,array('login','logout','register','admin',
+ 'subscribe','unsubscribe','profile',
+ 'resendpwd',))){
+ msg('Command unavailable: '.htmlspecialchars($act),-1);
+ return 'show';
+ }
+
if(array_search($act,array('login','logout','register','save','edit',
'preview','search','show','check','index','revisions',
'diff','recent','backlink','admin','subscribe',