Skip to content

Commit ccc3812

Browse files
authored
Fix(right): do no check right when add container (#951)
1 parent 42cdcaa commit ccc3812

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

front/container.form.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@
6161
Html::back();
6262
} else {
6363

64-
$right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']);
65-
if ($right < READ) {
66-
Html::displayRightError("User is missing the " . READ . " ('read') right for container");
64+
if ((int) $_GET['id'] > 0) {
65+
$right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']);
66+
if ($right < READ) {
67+
Html::displayRightError("User is missing the " . READ . " ('read') right for container");
68+
}
6769
}
6870

6971
Html::header(

0 commit comments

Comments
 (0)