FIX Api of documents work with value 'thirdparty'

This commit is contained in:
Laurent Destailleur 2019-08-25 16:41:59 +02:00
parent b7e7ca46b5
commit 60c3cefc53

View File

@ -2445,7 +2445,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
}
// Wrapping for third parties
elseif (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output))
elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->dir_output))
{
if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i', $original_file))