From 482775cd38ac3eae08f0f61f3a37e9db3875b7aa Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Thu, 17 Nov 2022 10:55:46 +0100 Subject: [PATCH] Fix issue #22846 --- htdocs/core/tpl/notes.tpl.php | 2 +- htdocs/product/note.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 2a0f3d654d7..c8f1ccd7a34 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -91,7 +91,7 @@ if ($module == 'propal') { } elseif ($module == 'shipping') { $permission = $user->hasRight("expedition", "creer"); } elseif ($module == 'product') { - $permission = $user->hasRight("produit", "creer"); + $permission = $user->hasRight("product", "creer"); } elseif ($module == 'service') { $permission = $user->hasRight("service", "creer"); } elseif ($module == 'ecmfiles') { diff --git a/htdocs/product/note.php b/htdocs/product/note.php index 0d7ad91af5f..ba83e64c401 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -54,13 +54,13 @@ $permissionnote = $user->rights->produit->creer; // Used by the include of actio if ($object->id > 0) { if ($object->type == $object::TYPE_PRODUCT) { - restrictedArea($user, 'produit', $object->id, 'product&product', '', ''); + restrictedArea($user, 'product', $object->id, 'product&product', '', ''); } if ($object->type == $object::TYPE_SERVICE) { restrictedArea($user, 'service', $object->id, 'product&product', '', ''); } } else { - restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); + restrictedArea($user, 'product|service', $fieldvalue, 'product&product', '', '', $fieldtype); }