2
0
forked from Wavyzz/dolibarr

Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2021-09-01 22:50:06 +02:00
8 changed files with 22 additions and 19 deletions

View File

@@ -80,7 +80,7 @@ class DolibarrApiAccess implements iAuthenticate
public function __isAllowed()
{
// phpcs:enable
global $conf, $db;
global $conf, $db, $user;
$login = '';
$stored_key = '';
@@ -150,6 +150,9 @@ class DolibarrApiAccess implements iAuthenticate
$fuser->getrights();
static::$user = $fuser;
// Set the global variable $user to the $user of API
$user = $fuser;
if ($fuser->socid) {
static::$role = 'external';
}