Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
897bbe8688
2 changed files with 6 additions and 2 deletions
|
|
@ -8457,8 +8457,9 @@ abstract class CommonObject
|
|||
$element = 'facture';
|
||||
} elseif ($element == 'invoice_supplier_rec') {
|
||||
return $user->rights->fournisseur->facture;
|
||||
} elseif ($element == 'evaluation') {
|
||||
return $user->rights->hrm->evaluation;
|
||||
} elseif (!empty($user->rights->{$this->module}->{$element})) {
|
||||
// for modules built with ModuleBuilder
|
||||
return $user->rights->{$this->module}->{$element};
|
||||
}
|
||||
|
||||
return $user->rights->{$element};
|
||||
|
|
|
|||
|
|
@ -353,6 +353,9 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
|||
} else {
|
||||
$objectid = $object; // $objectid can be X or 'X,Y,Z'
|
||||
}
|
||||
if ($objectid == "-1") {
|
||||
$objectid = 0;
|
||||
}
|
||||
if ($objectid) {
|
||||
$objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue