Fix:warehouses table name is entrepot which does not hold an fk_soc field, so _checkAccessToResource returns always false and must be disabled before fix. (#25135)
* Fix:warehouses table name is entrepot which does not hold an fk_soc field, so _checkAccessToResource returns always false and must be disabled before fix. * Fix:warehouses table name is entrepot which does not hold an fk_soc field, so _checkAccessToResource returns always false and must be disabled before fix. * Fix check params It is sufficient to fix check parameters to get it working * Update api_warehouses.class.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
e049222877
commit
cf11ecd085
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ class Warehouses extends DolibarrApi
|
|||
throw new RestException(404, 'warehouse not found');
|
||||
}
|
||||
|
||||
if (!DolibarrApi::_checkAccessToResource('warehouse', $this->warehouse->id)) {
|
||||
if (!DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id, 'entrepot')) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue