This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-05 15:32:24 +01:00
parent 41cfaf8a61
commit d985190a53

View file

@ -171,7 +171,7 @@ class Evaluation extends CommonObject
*/
public function __construct(DoliDB $db)
{
global $conf, $langs, $user;
global $langs, $user;
$this->db = $db;
@ -185,8 +185,8 @@ class Evaluation extends CommonObject
$this->fields['entity']['enabled'] = 0;
}
if (!$user->hasRight('hrm', 'evaluation', 'readall')) {
$this->fields['fk_user']['type'] .= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
if (!$user->hasRight('hrm', 'evaluation', 'readall') || 1) {
$this->fields['fk_user']['type'] .= ':t.rowid:IN:'.$this->db->sanitize(implode(",", $user->getAllChildIds(1)));
}
$this->date_eval = dol_now();