diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/xmlrpc.php | 21 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/en/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/plugin/lang/fr/lang.php | 2 |
3 files changed, 4 insertions, 21 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 108dd8fd1..8b572d213 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -30,26 +30,9 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { global $USERINFO; if(!$conf['useacl']) return true; //no ACL - then no checks + if(trim($conf['xmlrpcuser']) == '') return true; //no restrictions - $allowed = explode(',',$conf['xmlrpcuser']); - $allowed = array_map('trim', $allowed); - $allowed = array_unique($allowed); - $allowed = array_filter($allowed); - - if(!count($allowed)) return true; //no restrictions - - $user = $_SERVER['REMOTE_USER']; - $groups = (array) $USERINFO['grps']; - - if(in_array($user,$allowed)) return true; //user explicitly mentioned - - //check group memberships - foreach($groups as $group){ - if(in_array('@'.$group,$allowed)) return true; - } - - //still here? no access! - return false; + return auth_isMember($conf['xmlrpcuser'],$_SERVER['REMOTE_USER'],(array) $USERINFO['grps']); } /** diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php index 437c168bd..87570a708 100644 --- a/lib/plugins/plugin/lang/en/lang.php +++ b/lib/plugins/plugin/lang/en/lang.php @@ -73,6 +73,6 @@ $lang['enabled'] = 'Plugin %s enabled.'; $lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; $lang['disabled'] = 'Plugin %s disabled.'; $lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) successfully installed.'; //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 618e7a75b..2989d4913 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -61,4 +61,4 @@ $lang['enabled'] = 'Module %s activé.'; $lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.'; $lang['disabled'] = 'Module %s désactivé.'; $lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.'; -$lang['packageinstalled'] = 'Ensemble de modules (%d module%s: %s) installé avec succès.'; +$lang['packageinstalled'] = 'Ensemble de modules (%d module(s): %s) installé avec succès.'; |