summaryrefslogtreecommitdiff
path: root/lib/plugins/acl/admin.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-06-26 11:20:25 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-06-26 11:20:25 +0200
commit80601d26897c5dced80645aaf904085aa08b7bb9 (patch)
treeabf9b4df033a5032c5afbcc8c3c676a94260f6d4 /lib/plugins/acl/admin.php
parent69266de50f71b3d43011378cf0b0e8b8185c3609 (diff)
downloadrpg-80601d26897c5dced80645aaf904085aa08b7bb9.tar.gz
rpg-80601d26897c5dced80645aaf904085aa08b7bb9.tar.bz2
fixed wildcard handling in ACL manager FS#1955
This patch also removes legacy support for @USER@. Only %USER% is valid now.
Diffstat (limited to 'lib/plugins/acl/admin.php')
-rw-r--r--lib/plugins/acl/admin.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 1f666660c..673ffbc96 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -96,7 +96,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
if($_REQUEST['acl_t'] == '__g__' && $who){
$this->who = '@'.ltrim($auth->cleanGroup($who),'@');
}elseif($_REQUEST['acl_t'] == '__u__' && $who){
- $this->who = ltrim($auth->cleanUser($who),'@');
+ $this->who = ltrim($who,'@');
+ if($this->who != '%USER%'){ #keep wildcard as is
+ $this->who = $auth->cleanUser($this->who);
+ }
}elseif($_REQUEST['acl_t'] &&
$_REQUEST['acl_t'] != '__u__' &&
$_REQUEST['acl_t'] != '__g__'){
@@ -150,7 +153,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
if ($who!='@ALL') {
$who = '@'.ltrim($auth->cleanGroup($who),'@');
}
- } else {
+ } elseif ($who != '%USER%'){ #keep wildcard as is
$who = $auth->cleanUser($who);
}
$who = auth_nameencode($who,true);