Merge pull request #11192 from atm-maxime/fix_usertab_hr

Fix : display hr tab on user if rights to read all
This commit is contained in:
Laurent Destailleur 2019-05-18 00:48:06 +02:00 committed by GitHub
commit 590ee589c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,8 +144,8 @@ function user_prepare_head($object)
if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->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 )
|| (! 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->read_all))
)
{
// Bank