From 9866640570d770613dfe238089603696d9cc2bdf Mon Sep 17 00:00:00 2001 From: Stanislas Date: Wed, 14 May 2025 11:51:13 +0200 Subject: [PATCH] Fix(right): do no check right when add container --- front/container.form.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/front/container.form.php b/front/container.form.php index 28e8c37a..8a80410a 100644 --- a/front/container.form.php +++ b/front/container.form.php @@ -61,9 +61,11 @@ Html::back(); } else { - $right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']); - if ($right < READ) { - Html::displayRightError("User is missing the " . READ . " ('read') right for container"); + if ((int) $_GET['id'] > 0) { + $right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']); + if ($right < READ) { + Html::displayRightError("User is missing the " . READ . " ('read') right for container"); + } } Html::header(