summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-06-29 15:01:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-06-29 15:01:48 +0200
commitd0f8d50b16073494dc8ccc16905d445467e648cd (patch)
tree5cadf3d061da179d8d103061de22a30b62ae0213 /inc/auth.php
parentbca545e60204a29018cc5002a1280a01b64594d9 (diff)
downloadrpg-d0f8d50b16073494dc8ccc16905d445467e648cd.tar.gz
rpg-d0f8d50b16073494dc8ccc16905d445467e648cd.tar.bz2
simplified %GROUP% wildcard support
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php12
1 files changed, 6 insertions, 6 deletions
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);