forked from Wavyzz/dolibarr
Fix check on permissions
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user