forked from Wavyzz/dolibarr
Fix var not correctly initialized when using api + multicompany
This commit is contained in:
@@ -382,8 +382,12 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
|
|||||||
$nocheck = array('barcode','stock','fournisseur'); // No test
|
$nocheck = array('barcode','stock','fournisseur'); // No test
|
||||||
$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...).
|
$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...).
|
||||||
|
|
||||||
// If dbtable not defined, we use same name for table than module name
|
// If dbtablename not defined, we use same name for table than module name
|
||||||
if (empty($dbtablename)) $dbtablename = $feature;
|
if (empty($dbtablename))
|
||||||
|
{
|
||||||
|
$dbtablename = $feature;
|
||||||
|
$sharedelement = (! empty($params[1]) ? $params[1] : $dbtablename); // We change dbtablename, so we set sharedelement too.
|
||||||
|
}
|
||||||
|
|
||||||
// Check permission for object with entity
|
// Check permission for object with entity
|
||||||
if (in_array($feature,$check))
|
if (in_array($feature,$check))
|
||||||
|
|||||||
Reference in New Issue
Block a user