From 8906da5c5dc25303fbc086d711e98832a6e66fcf Mon Sep 17 00:00:00 2001 From: Rom1-B Date: Mon, 5 May 2025 14:34:29 +0200 Subject: [PATCH 1/2] Fix: front/ check --- front/devicecamera.form.php | 1 + front/devicecamera.php | 1 + front/dropdown.form.php | 1 + front/dropdown.php | 1 + front/example.form.php | 1 + front/example.php | 1 + front/ruletest.form.php | 1 + front/ruletest.php | 1 + 8 files changed, 8 insertions(+) diff --git a/front/devicecamera.form.php b/front/devicecamera.form.php index fbf9bdb..2da3152 100644 --- a/front/devicecamera.form.php +++ b/front/devicecamera.form.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\DeviceCamera; include ('../../../inc/includes.php'); +Session::checkLoginUser(); $dropdown = new DeviceCamera(); include (GLPI_ROOT . "/front/dropdown.common.form.php"); diff --git a/front/devicecamera.php b/front/devicecamera.php index 2254232..be1a436 100644 --- a/front/devicecamera.php +++ b/front/devicecamera.php @@ -34,6 +34,7 @@ // ---------------------------------------------------------------------- include ('../../../inc/includes.php'); +Session::checkLoginUser(); $dropdown = new DeviceCamera(); include (GLPI_ROOT . "/front/dropdown.common.php"); diff --git a/front/dropdown.form.php b/front/dropdown.form.php index e4f1ea9..cf88c33 100644 --- a/front/dropdown.form.php +++ b/front/dropdown.form.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\Dropdown; include ('../../../inc/includes.php'); +Session::checkLoginUser(); Plugin::load('example', true); diff --git a/front/dropdown.php b/front/dropdown.php index 6e56f24..df91884 100644 --- a/front/dropdown.php +++ b/front/dropdown.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\Dropdown; include ('../../../inc/includes.php'); +Session::checkLoginUser(); Plugin::load('example', true); diff --git a/front/example.form.php b/front/example.form.php index bc97177..9650560 100644 --- a/front/example.form.php +++ b/front/example.form.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\Example; include ('../../../inc/includes.php'); +Session::checkLoginUser(); if ($_SESSION["glpiactiveprofile"]["interface"] == "central") { Html::header("TITRE", $_SERVER['PHP_SELF'], "plugins", Example::class, ""); diff --git a/front/example.php b/front/example.php index c1074cf..8178092 100644 --- a/front/example.php +++ b/front/example.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\Example; include ('../../../inc/includes.php'); +Session::checkLoginUser(); if ($_SESSION["glpiactiveprofile"]["interface"] == "central") { Html::header("TITRE", $_SERVER['PHP_SELF'], "plugins", Example::class, ""); diff --git a/front/ruletest.form.php b/front/ruletest.form.php index 6f67fb2..5578d10 100644 --- a/front/ruletest.form.php +++ b/front/ruletest.form.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\RuleTestCollection; include ('../../../inc/includes.php'); +Session::checkLoginUser(); $rulecollection = new RuleTestCollection(); diff --git a/front/ruletest.php b/front/ruletest.php index a79689f..8976275 100644 --- a/front/ruletest.php +++ b/front/ruletest.php @@ -36,6 +36,7 @@ use GlpiPlugin\Example\RuleTestCollection; include ('../../../inc/includes.php'); +Session::checkLoginUser(); $rulecollection = new RuleTestCollection(); From eff7db51b2217bd002e57da98e857135e22c6001 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Mon, 5 May 2025 14:40:26 +0200 Subject: [PATCH 2/2] Update front/example.php --- front/example.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/example.php b/front/example.php index 8178092..64def29 100644 --- a/front/example.php +++ b/front/example.php @@ -36,7 +36,7 @@ use GlpiPlugin\Example\Example; include ('../../../inc/includes.php'); -Session::checkLoginUser(); +Session::checkRight(Example::$rightname, READ); if ($_SESSION["glpiactiveprofile"]["interface"] == "central") { Html::header("TITRE", $_SERVER['PHP_SELF'], "plugins", Example::class, "");