From dbbc6aa7ce26c6f7fa25e233787dc448806fea30 Mon Sep 17 00:00:00 2001 From: andi Date: Fri, 11 Mar 2005 14:24:08 +0100 Subject: permission check fixed darcs-hash:20050311132408-9977f-212aa31223494e0eba53bfe41ed1613835ca0d2e.gz --- inc/actions.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 1e86d6979..e660c136b 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -98,6 +98,8 @@ function act_clean($act){ * @author Andreas Gohr */ function act_permcheck($act){ + global $INFO; + if(in_array($act,array('save','preview','edit'))){ if($INFO['exists']){ $permneed = AUTH_EDIT; @@ -109,12 +111,9 @@ function act_permcheck($act){ }else{ $permneed = AUTH_READ; } - if(! auth_quickaclcheck($ID) >= $permneed){ - return 'denied'; - } + if($INFO['perm'] >= $permneed) return $act; - - return $act; + return 'denied'; } /** -- cgit v1.2.3