From 411d276ed2dea990fee8d6e5266b02f569b4fe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= <marcosgdf@gmail.com> Date: Sun, 9 Apr 2017 14:29:40 +0200 Subject: [PATCH] FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry Close #6669 --- htdocs/compta/facture.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f900e2889a3..8a80fa4bf96 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3744,7 +3744,9 @@ else if ($id > 0 || ! empty($ref)) print '</td>'; if ($action != 'classify') { print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&facid=' . $object->id . '">'; - print img_edit($langs->trans('SetProject'), 1); + if ($user->rights->facture->creer) { + print img_edit($langs->trans('SetProject'), 1); + } print '</a></td>'; } print '</tr></table>'; -- GitLab