From b78bf706e2ab1d34498beea00b7ecfda11944eee Mon Sep 17 00:00:00 2001 From: romain Date: Mon, 30 Jan 2012 19:58:55 +0100 Subject: Added support for the %GROUP% wildcard. %GROUP% is the same as %USER% except it's done on each group a user is in. %USER% and %GROUP% cannot be mixed on an ACL line. --- lib/plugins/acl/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/acl') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index a6b0624bc..4d2be8dd0 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -84,7 +84,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $this->who = '@'.ltrim($auth->cleanGroup($who),'@'); }elseif($_REQUEST['acl_t'] == '__u__' && $who){ $this->who = ltrim($who,'@'); - if($this->who != '%USER%'){ #keep wildcard as is + if($this->who != '%USER%' && $this->who != '%GROUP%'){ #keep wildcard as is $this->who = $auth->cleanUser($this->who); } }elseif($_REQUEST['acl_t'] && @@ -140,7 +140,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if ($who!='@ALL') { $who = '@'.ltrim($auth->cleanGroup($who),'@'); } - } elseif ($who != '%USER%'){ #keep wildcard as is + } elseif ($who != '%USER%' && $who != '%GROUP%'){ #keep wildcard as is $who = $auth->cleanUser($who); } $who = auth_nameencode($who,true); -- cgit v1.2.3