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);
|
||||
|
||||
if ($action == 'getSellerVATRates') { // action = 'getSellerVATRates'
|
||||
if ($action == 'getSellerVATRates') { // action = 'getSellerVATRates'. Test on permission not required here, already done in the restrictArea()
|
||||
$seller = $mysoc;
|
||||
$buyer = $soc;
|
||||
} else { // action = 'getBuyerVATRates'
|
||||
} else { // action = 'getBuyerVATRates' or 'getVatRates'. Test on permission not required here, already done in the restrictArea()
|
||||
$buyer = $mysoc;
|
||||
$seller = $soc;
|
||||
}
|
||||
|
||||
@@ -654,7 +654,7 @@ class CodingPhpTest extends CommonClassTest
|
||||
$ok = true;
|
||||
$matches = array();
|
||||
|
||||
// Get to part of string to use for analysis
|
||||
// Get the part of string to use for analysis
|
||||
$reg = array();
|
||||
if (preg_match('/\*\s+Action(.*)\*\s+View/ims', $filecontentorigin, $reg)) {
|
||||
$filecontentaction = $reg[1];
|
||||
|
||||
Reference in New Issue
Block a user