Fix permission to see HR tab on user. All HR on same tabs.
This commit is contained in:
parent
8ec9257302
commit
f5d9403c7d
@ -143,7 +143,10 @@ function user_prepare_head($object)
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'user');
|
||||
|
||||
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
|| (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->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)
|
||||
|| (! empty($conf->holiday->enabled) && ! empty($user->rights->holiday->read) && $user->id == $object->id )
|
||||
)
|
||||
{
|
||||
// Bank
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id;
|
||||
|
||||
@ -89,7 +89,8 @@ class modHoliday extends DolibarrModules
|
||||
$this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
$this->tabs[] = array('data'=>'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__'); // To add a new tab identified by code tabname1
|
||||
//$this->tabs[] = array('data'=>'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__'); // We avoid to get one tab for each module. RH data are already in RH tab.
|
||||
$this->tabs[] = array(); // To add a new tab identified by code tabname1
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(); // List of boxes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user