diff --git a/htdocs/document.php b/htdocs/document.php index 940b7a3a83f..74ac48317ab 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -26,7 +26,7 @@ \file htdocs/document.php \brief Wrapper permettant le téléchargement de fichier de données Dolibarr L'appel ancienne méthode (non sécurisée) est document.php?file=pathcompletdufichier - L'appel nouvelle méthode (sécurisée) est document.php?file=pathrelatifdufichier&type=typefichier + L'appel nouvelle méthode (sécurisée) est document.php?file=pathrelatifdufichier&modulepart=typefichier \version $Revision$ */ @@ -55,6 +55,15 @@ if ($modulepart) } $original_file=$conf->compta->dir_output.'/'.$original_file; } + if ($modulepart == 'facture') + { + $user->getrights('facture'); + if ($user->rights->facture->lire) + { + $accessallowed=1; + } + $original_file=$conf->facture->dir_output.'/'.$original_file; + } } else {