Change permission checks from 'expensereport' to 'holiday' (#35062)
error on class holiday
This commit is contained in:
parent
4c0972ef26
commit
4ed8630c3f
1 changed files with 2 additions and 2 deletions
|
|
@ -2493,7 +2493,7 @@ class Holiday extends CommonObject
|
|||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as h";
|
||||
$sql .= " WHERE h.statut > 1";
|
||||
$sql .= " AND h.entity IN (".getEntity('holiday').")";
|
||||
if (!$user->hasRight('expensereport', 'readall')) {
|
||||
if (!$user->hasRight('holiday', 'readall')) {
|
||||
$userchildids = $user->getAllChildIds(1);
|
||||
$sql .= " AND (h.fk_user IN (".$this->db->sanitize(implode(',', $userchildids)).")";
|
||||
$sql .= " OR h.fk_validator IN (".$this->db->sanitize(implode(',', $userchildids))."))";
|
||||
|
|
@ -2535,7 +2535,7 @@ class Holiday extends CommonObject
|
|||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as h";
|
||||
$sql .= " WHERE h.statut = 2";
|
||||
$sql .= " AND h.entity IN (".getEntity('holiday').")";
|
||||
if (!$user->hasRight('expensereport', 'read_all')) {
|
||||
if (!$user->hasRight('holiday', 'read_all')) {
|
||||
$userchildids = $user->getAllChildIds(1);
|
||||
$sql .= " AND (h.fk_user IN (".$this->db->sanitize(implode(',', $userchildids)).")";
|
||||
$sql .= " OR h.fk_validator IN (".$this->db->sanitize(implode(',', $userchildids))."))";
|
||||
|
|
|
|||
Loading…
Reference in a new issue