From a14d9c4da0724083ea0976db44cfcf66db325f5b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 25 Sep 2017 23:52:53 +0200 Subject: [PATCH] testfix permission (authdefault) --- build/api/core/AuthSystemDefault.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/api/core/AuthSystemDefault.php b/build/api/core/AuthSystemDefault.php index 74c7d84..862f4d0 100755 --- a/build/api/core/AuthSystemDefault.php +++ b/build/api/core/AuthSystemDefault.php @@ -232,17 +232,17 @@ /* (1) Si entrepot requis, mais manquant ---------------------------------------------------------*/ - if( in_array('warehouse', $expected) && self::auth() < 1 ) + if( in_array('warehouse', $expected) && !isset($_SESSION['WAREHOUSE']['id']) ) return Err::PermissionError; /* (2) Si admin requis, mais manquant ---------------------------------------------------------*/ - if( in_array('admin', $expected) && self::auth() != 2 ) + if( in_array('admin', $expected) && !isset($_SESSION['ADMIN']['id']) ) return Err::PermissionError; /* (3) Si SATS requis, mais manquant ---------------------------------------------------------*/ - if( in_array('sats', $expected) && self::auth() < 3 ) + if( in_array('sats', $expected) && !isset($_SESSION['SATS']['id']) ) return Err::TokenError; /* (4) On retire 'warehouse', 'admin' et 'sats' de @expected