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