fix: read employee and write employee
This commit is contained in:
parent
08fa2dfadd
commit
91ee90ebeb
@ -141,7 +141,7 @@ function user_prepare_head($object)
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'user');
|
||||
|
||||
if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
||||
if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && !empty($user->rights->hrm->read_employee->read))
|
||||
|| (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))
|
||||
|| (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall))
|
||||
|| (!empty($conf->holiday->enabled) && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->readall))
|
||||
|
||||
@ -255,7 +255,7 @@ class modHRM extends DolibarrModules
|
||||
$this->rights[$r][1] = 'Read employee'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'read_employee';
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->compare_advance->read)
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->read_employee->read)
|
||||
$r++;
|
||||
|
||||
// Write employee
|
||||
@ -263,7 +263,7 @@ class modHRM extends DolibarrModules
|
||||
$this->rights[$r][1] = 'Write employee'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'write_employee';
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->compare_advance->read)
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->write_employee->write)
|
||||
$r++;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user