Skip to content

Commit 1859f02

Browse files
committed
Revert "Fix: front/ check (#949)"
This reverts commit 42cdcaa.
1 parent d3388a9 commit 1859f02

17 files changed

+4
-31
lines changed

ajax/container.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,10 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
use Glpi\Http\Response;
3534

3635
if (isset($_GET['action']) && $_GET['action'] === 'get_fields_html') {
37-
38-
$right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_GET['id']);
39-
if ($right < READ) {
40-
Response::sendError(403, 'Forbidden');
41-
return;
42-
}
43-
4436
$containers_id = $_GET['id'];
4537
$itemtype = $_GET['itemtype'];
4638
$items_id = (int) $_GET['items_id'];

ajax/container_display_condition.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
if (isset($_GET['action'])) {
3534
if ($_GET['action'] === 'get_add_form') {

ajax/container_itemtypes_dropdown.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
PluginFieldsContainer::showFormItemtype($_REQUEST);

ajax/container_subtype_dropdown.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
PluginFieldsContainer::showFormSubtype($_REQUEST, true);

ajax/reorder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
if (
3534
!array_key_exists('container_id', $_POST)

ajax/status_override.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
if (isset($_GET['action'])) {
3534
if ($_GET['action'] === 'get_status_dropdown') {

front/commondropdown.form.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include '../../../inc/includes.php';
32-
Session::checkLoginUser();
3332
if (preg_match('/[a-z]/i', $_REQUEST['ddtype']) !== 1) {
3433
throw new \RuntimeException(sprintf('Invalid itemtype "%1$s"', $_REQUEST['ddtype']));
3534
}

front/commondropdown.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include '../../../inc/includes.php';
32-
Session::checkLoginUser();
3332
if (preg_match('/[a-z]/i', $_REQUEST['ddtype']) !== 1) {
3433
throw new \RuntimeException(sprintf('Invalid itemtype "%1$s"', $_REQUEST['ddtype']));
3534
}

front/container.form.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
if (empty($_GET['id'])) {
3534
$_GET['id'] = '';
@@ -60,12 +59,6 @@
6059
}
6160
Html::back();
6261
} else {
63-
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");
67-
}
68-
6962
Html::header(
7063
__('Additional fields', 'fields'),
7164
$_SERVER['PHP_SELF'],

front/container.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
*/
3030

3131
include('../../../inc/includes.php');
32-
Session::checkLoginUser();
3332

3433
Html::header(
3534
__('Additional fields', 'fields'),
@@ -39,7 +38,7 @@
3938
'fieldscontainer',
4039
);
4140

42-
Session::checkRight('config', READ);
41+
Session::checkRight('entity', READ);
4342

4443
PluginFieldsContainer::titleList();
4544
Search::show('PluginFieldsContainer');

0 commit comments

Comments
 (0)