Merge branch 'FIX_read_evaluation_of_user_and_subordinates_with_read_right' of github.com:atm-gauthier/dolibarr into FIX_read_evaluation_of_user_and_subordinates_with_read_right

This commit is contained in:
Gauthier PC portable 024 2022-12-15 17:07:21 +01:00
commit 12c7cb1b84
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class Evaluation extends CommonObject
$this->fields['entity']['enabled'] = 0;
}
if(empty($user->rights->hrm->evaluation->readall)) $this->fields['fk_user']['type'].= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
if (empty($user->rights->hrm->evaluation->readall)) $this->fields['fk_user']['type'].= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
$this->date_eval = dol_now();

View File

@ -275,7 +275,7 @@ if ($search_all) {
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
}
if(empty($permissiontoreadall)) {
if (empty($permissiontoreadall)) {
$sql.= " AND t.fk_user IN(".implode(", ", $user->getAllChildIds(1)).") ";
}