2
0
forked from Wavyzz/dolibarr

Fix check on permissions

This commit is contained in:
Laurent Destailleur
2024-09-13 04:47:07 +02:00
parent ee9a5b05d0
commit 75d62b5f0a
2 changed files with 3 additions and 3 deletions

View File

@@ -58,10 +58,10 @@ if (!empty($id) && !empty($action) && !empty($htmlname)) {
$soc->fetch($id); $soc->fetch($id);
if ($action == 'getSellerVATRates') { // action = 'getSellerVATRates' if ($action == 'getSellerVATRates') { // action = 'getSellerVATRates'. Test on permission not required here, already done in the restrictArea()
$seller = $mysoc; $seller = $mysoc;
$buyer = $soc; $buyer = $soc;
} else { // action = 'getBuyerVATRates' } else { // action = 'getBuyerVATRates' or 'getVatRates'. Test on permission not required here, already done in the restrictArea()
$buyer = $mysoc; $buyer = $mysoc;
$seller = $soc; $seller = $soc;
} }

View File

@@ -654,7 +654,7 @@ class CodingPhpTest extends CommonClassTest
$ok = true; $ok = true;
$matches = array(); $matches = array();
// Get to part of string to use for analysis // Get the part of string to use for analysis
$reg = array(); $reg = array();
if (preg_match('/\*\s+Action(.*)\*\s+View/ims', $filecontentorigin, $reg)) { if (preg_match('/\*\s+Action(.*)\*\s+View/ims', $filecontentorigin, $reg)) {
$filecontentaction = $reg[1]; $filecontentaction = $reg[1];