New Filestructure for Docker

This commit is contained in:
2026-07-31 23:53:14 +02:00
parent 1e10ed4de8
commit 5bcf2a3546
239 changed files with 710 additions and 2000 deletions
@@ -0,0 +1,38 @@
<?php
if (!isset($baseDir)) {
$baseDir = $_SERVER['DOCUMENT_ROOT'];
}
require_once $baseDir . '/../scripts/session_functions.php';
ini_wkvs_session();
verify_csrf();
$accessPermission = trim($_POST['accessPermission'] ?? '');
$access = preg_replace("/[\W]/", "", trim($_POST['access'] ?? ''));
$accesstype = preg_replace("/[\W]/", "", trim($_POST['accesstype'] ?? ''));
if ($accessPermission === '' || $access === '' || $accesstype === '') {
echo json_encode(['success' => false, 'message' => 'Parameters not correctly set']);
http_response_code(400);
exit;
}
require $baseDir . "/../scripts/websocket/ws-create-token.php";
if ($accessPermission === "R") {
$token = generateWSReadToken($accesstype, $access);
} elseif ($accessPermission === "W") {
check_multiple_allowed_permissions(['kampfrichter', 'wk_leitung']);
$token = generateWSAdminToken($accesstype, $access);
} else {
http_response_code(403);
exit;
}
$responseBool = $token != null;
echo json_encode(['success' => $responseBool, 'token' => $token]);