v.1.1 changes 16-04-2026:

- Minor changes to interface.
- Fixed different missing includes.
- Access now denied to api calls that are related to disabled modules.
- Fixed sorting of CPU and memory in server overview.
This commit is contained in:
2026-04-16 15:01:40 +02:00
parent 36b0ebd10c
commit eec1d13cf5
40 changed files with 26451 additions and 26428 deletions

View File

@@ -1,43 +1,43 @@
<?php
use api\classes\API_office_stompjes;
if (!$GLOBALS['modules_enabled']['office']) {
echo '405 Not Allowed';
exit;
}
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_office_stompjes.php';
$API_office_stompjes = new API_office_stompjes();
if ($API_office_stompjes->request_method === 'POST') {
$API_office_stompjes->checkPermissions('ofice-stompjes-canstomp', 'RW');
$API_office_stompjes->return_url = false;
$requiredFields = [
'user_uuid' => ['type' => 'uuid']
];
$API_office_stompjes->validateData($requiredFields);
$modules = $API_office_stompjes->addStomp();
$API_office_stompjes->apiOutput($code = 200, ['success' => 'stomp added successfully.']);
} elseif ($API_office_stompjes->request_method === 'DELETE') {
# Only superuser can delete permission due to fact that the backend needs programming when setting a permission
$API_office_stompjes->checkPermissions('ofice-stompjes', 'RW');
# when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection
$API_office_stompjes->return_url = false;
$requiredFields = ['stomp_uuid' => ['type' => 'uuid']];
$API_office_stompjes->validateData($requiredFields);
# delete permission
$API_office_stompjes->deleteStomp();
<?php
use api\classes\API_office_stompjes;
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_office_stompjes.php';
$API_office_stompjes = new API_office_stompjes();
if (!$GLOBALS['modules_enabled']['office']) {
echo '405 Not Allowed';
exit;
}
if ($API_office_stompjes->request_method === 'POST') {
$API_office_stompjes->checkPermissions('ofice-stompjes-canstomp', 'RW');
$API_office_stompjes->return_url = false;
$requiredFields = [
'user_uuid' => ['type' => 'uuid']
];
$API_office_stompjes->validateData($requiredFields);
$modules = $API_office_stompjes->addStomp();
$API_office_stompjes->apiOutput($code = 200, ['success' => 'stomp added successfully.']);
} elseif ($API_office_stompjes->request_method === 'DELETE') {
# Only superuser can delete permission due to fact that the backend needs programming when setting a permission
$API_office_stompjes->checkPermissions('ofice-stompjes', 'RW');
# when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection
$API_office_stompjes->return_url = false;
$requiredFields = ['stomp_uuid' => ['type' => 'uuid']];
$API_office_stompjes->validateData($requiredFields);
# delete permission
$API_office_stompjes->deleteStomp();
}