From 43c5dd2aea7ff54952fe1e7fd4e4e3fe4d7f5389 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jun 2021 14:29:07 +0200 Subject: [PATCH] Fix permissions --- htdocs/user/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c788c8305b3..1404e86be9d 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2630,7 +2630,8 @@ if ($action == 'create' || $action == 'adduserldap') { } print ''; - if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) + if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && in_array($id, $childids)) + || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall)) || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { $langs->load("salaries");