fix logs client
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
use GlpiPlugin\Urbackup\Config;
|
||||
use GlpiPlugin\Urbackup\Profile;
|
||||
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
define('GLPI_ROOT', dirname(__DIR__, 4));
|
||||
@@ -22,6 +23,11 @@ Html::header_nocache();
|
||||
|
||||
Session::checkLoginUser();
|
||||
|
||||
if (!Profile::canCurrentUser(READ)) {
|
||||
http_response_code(403);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? '') !== 'GET') {
|
||||
http_response_code(405);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user