From a8fe108b00a44fe91f90820a1e3cf44b55de2259 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Fri, 2 Mar 2007 00:03:09 +0100 Subject: Allow @USER@ variable in ACLs This saves a lot of ACL lines for users namespaces for example: users:* @ALL 1 users:@USER@ @USER@ 8 darcs-hash:20070301230309-19e2d-90a00b70a2af546fd5194ade614c130e9f7864eb.gz --- inc/auth.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc/auth.php') diff --git a/inc/auth.php b/inc/auth.php index ef1891627..9fa721e14 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -76,6 +76,9 @@ global $AUTH_ACL; if(is_readable(DOKU_CONF.'acl.auth.php')){ $AUTH_ACL = file(DOKU_CONF.'acl.auth.php'); + if(isset($_SERVER['REMOTE_USER']){ + $AUTH_ACL = str_replace('@USER@',$_SERVER['REMOTE_USER'],$AUTH_ACL); + } }else{ $AUTH_ACL = array(); } -- cgit v1.2.3