diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-06-29 15:01:48 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-06-29 15:01:48 +0200 |
commit | d0f8d50b16073494dc8ccc16905d445467e648cd (patch) | |
tree | 5cadf3d061da179d8d103061de22a30b62ae0213 | |
parent | bca545e60204a29018cc5002a1280a01b64594d9 (diff) | |
download | rpg-d0f8d50b16073494dc8ccc16905d445467e648cd.tar.gz rpg-d0f8d50b16073494dc8ccc16905d445467e648cd.tar.bz2 |
simplified %GROUP% wildcard support
-rw-r--r--[-rwxr-xr-x] | conf/dokuwiki.php | 2 | ||||
-rw-r--r-- | inc/auth.php | 12 | ||||
-rw-r--r-- | lib/plugins/config/lang/en/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/config/lang/fr/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/config/settings/config.metadata.php | 2 |
5 files changed, 6 insertions, 14 deletions
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 1eb6f5c5d..cbd42115d 100755..100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -53,8 +53,6 @@ $conf['hidepages'] = ''; //Regexp for pages to be skipped from /* Authentication Settings */ $conf['useacl'] = 0; //Use Access Control Lists to restrict access? -$conf['usewildcards'] = 1; //Use ACL wildcard %USER% -$conf['groupwildcards'] = 0; //More specifically, use %GROUP% wildcard $conf['autopasswd'] = 1; //autogenerate passwords and email them to user $conf['authtype'] = 'plain'; //which authentication backend should be used $conf['passcrypt'] = 'smd5'; //Used crypt method (smd5,md5,sha1,ssha,crypt,mysql,my411) diff --git a/inc/auth.php b/inc/auth.php index 58c796f2e..1263f7aec 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -136,12 +136,12 @@ function auth_loadACL() { for($i = 0; $i < $len; $i++) { if($acl[$i]{0} == '#') continue; list($id,$rest) = preg_split('/\s+/',$acl[$i],2); - if($conf['groups_wilcards'] && (strstr($id, '%GROUP%') || strstr($rest, '%GROUP%'))){ - foreach($USERINFO['grps'] as $grp){ - $nid = str_replace('%GROUP%',cleanID($grp),$id); - $nrest = str_replace('%GROUP%',auth_nameencode($grp),$rest); - $acl[] = "$nid\t$nrest"; - } + if(strstr($acl[$i], '%GROUP%')){ + foreach($USERINFO['grps'] as $grp){ + $nid = str_replace('%GROUP%',cleanID($grp),$id); + $nrest = str_replace('%GROUP%',auth_nameencode($grp),$rest); + $acl[] = "$nid\t$nrest"; + } } $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id); $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest); diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index abc069eab..83c843b3a 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -92,8 +92,6 @@ $lang['hidepages'] = 'Hide pages matching this regular expressions from search /* Authentication Settings */ $lang['useacl'] = 'Use access control lists'; -$lang['usewildcards'] = 'Use the wildcard %USER% for ACL'; -$lang['groupwildcards'] = 'Use the wildcard %GROUP% for ACL'; $lang['autopasswd'] = 'Autogenerate passwords'; $lang['authtype'] = 'Authentication backend'; $lang['passcrypt'] = 'Password encryption method'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 5fdcd474c..591e9f2fb 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -79,8 +79,6 @@ $lang['useheading'] = 'Utiliser le titre de premier niveau'; $lang['sneaky_index'] = 'Par défaut, DokuWiki affichera toutes les catégories dans la vue par index. Activer cette option permet de cacher celles pour lesquelles l\'utilisateur n\'a pas la permission de lecture. Il peut en résulter le masquage de sous-catégories accessibles. Ceci peut rendre l\'index inutilisable avec certaines ACL.'; $lang['hidepages'] = 'Cacher les pages correspondant à (expression régulière)'; $lang['useacl'] = 'Utiliser les listes de contrôle d\'accès (ACL)'; -$lang['usewildcards'] = 'Utiliser le joker %USER% dans les ACL'; -$lang['groupwildcards'] = 'Utiliser le joker %GROUP% dans les ACL'; $lang['autopasswd'] = 'Auto-générer les mots de passe'; $lang['authtype'] = 'Mécanisme d\'authentification'; $lang['passcrypt'] = 'Méthode de chiffrement des mots de passe'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 675dca6cc..3607f56c6 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -124,8 +124,6 @@ $meta['hidepages'] = array('string'); $meta['_authentication'] = array('fieldset'); $meta['useacl'] = array('onoff'); -$meta['usewildcards'] = array('onoff'); -$meta['groupwildcards'] = array('onoff'); $meta['autopasswd'] = array('onoff'); $meta['authtype'] = array('authtype'); $meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','bcrypt')); |