Fix: broken multicompany transverse mode authentication feature

This commit is contained in:
Regis Houssin 2016-04-19 13:38:32 +02:00
parent 0ad971556b
commit 0a52abab5d

View File

@ -207,6 +207,9 @@ class User extends CommonObject
} }
else // The fetch was forced on an entity else // The fetch was forced on an entity
{ {
if (!empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode))
$sql.= " WHERE u.entity IS NOT NULL"; // multicompany is on in transverse mode or user making fetch is on entity 0, so user is allowed to fetch anywhere into database
else
$sql.= " WHERE u.entity IN (0, ".$conf->entity.")"; $sql.= " WHERE u.entity IN (0, ".$conf->entity.")";
} }