testfix permission (authdefault)
This commit is contained in:
parent
352dfdc995
commit
a14d9c4da0
|
@ -232,17 +232,17 @@
|
||||||
|
|
||||||
/* (1) Si entrepot requis, mais manquant
|
/* (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;
|
return Err::PermissionError;
|
||||||
|
|
||||||
/* (2) Si admin requis, mais manquant
|
/* (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;
|
return Err::PermissionError;
|
||||||
|
|
||||||
/* (3) Si SATS requis, mais manquant
|
/* (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;
|
return Err::TokenError;
|
||||||
|
|
||||||
/* (4) On retire 'warehouse', 'admin' et 'sats' de @expected
|
/* (4) On retire 'warehouse', 'admin' et 'sats' de @expected
|
||||||
|
|
Loading…
Reference in New Issue