FIX user permission on ajax request getInvoice

This commit is contained in:
VESSILLER 2020-03-11 17:16:44 +01:00
parent 99d5b175c6
commit e4c97f0b15

View File

@ -120,7 +120,7 @@ elseif ($action == 'search' && $term != '') {
$object->fetch($id);
$ret = $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term});
}
} elseif ($action == 'getInvoice') {
} elseif ($action == 'getInvoice' && $user->rights->facture->lire) {
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
$object = new Facture($db);