Backend-Editoren admin-geschuetzt (admin_gate) + Admin-Hub auf Admin-Seite; save_map admin-oder-lehrer; foto-upload admin-bypass (PIN bleibt)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Direkter Zugriff auf die Editor-UI gesperrt — nur über den admin-geschützten
|
||||
# editor.php (Admin-Gate) erreichbar. editor.php liest editor.html serverseitig.
|
||||
<Files "editor.html">
|
||||
Require all denied
|
||||
</Files>
|
||||
@@ -14,8 +14,13 @@ require_once __DIR__ . '/../../../php/config/app.php';
|
||||
require_once __DIR__ . '/../../../php/lib/Database.php';
|
||||
require_once __DIR__ . '/../../../php/lib/Response.php';
|
||||
require_once __DIR__ . '/../../../php/lib/Session.php';
|
||||
Session::start(); // Session laden, sonst ist $_SESSION leer → requireTeacher wirft immer 401
|
||||
Session::requireTeacher();
|
||||
Session::start(); // Session laden, sonst ist $_SESSION leer → Auth-Check wirft immer 401
|
||||
// Backend-Editor: Admin ODER eingeloggte Lehrperson darf speichern.
|
||||
if (empty($_SESSION['admin_id']) && !Session::teacherId()) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['ok' => false, 'error' => 'Nicht eingeloggt (Admin oder Lehrperson erforderlich).']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$raw = file_get_contents('php://input');
|
||||
$data = json_decode($raw, true);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin-geschützter Zugang zum Tourismusregion-Karten-Editor.
|
||||
* Nur mit Admin-Session erreichbar; die eigentliche UI liegt in editor.html
|
||||
* (per .htaccess vor direktem Zugriff gesperrt) und wird hier ausgeliefert.
|
||||
*/
|
||||
require __DIR__ . '/../../php/lib/admin_gate.php';
|
||||
readfile(__DIR__ . '/editor.html');
|
||||
@@ -0,0 +1,5 @@
|
||||
# Direkter Zugriff auf die Editor-UI gesperrt — nur über den admin-geschützten
|
||||
# editor.php (Admin-Gate) erreichbar. editor.php liest editor.html serverseitig.
|
||||
<Files "editor.html">
|
||||
Require all denied
|
||||
</Files>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin-geschützter Zugang zum Tourismustal-Sprite-Editor.
|
||||
* Nur mit Admin-Session erreichbar; die UI liegt in editor.html
|
||||
* (per .htaccess vor direktem Zugriff gesperrt) und wird hier ausgeliefert.
|
||||
*/
|
||||
require __DIR__ . '/../../php/lib/admin_gate.php';
|
||||
readfile(__DIR__ . '/editor.html');
|
||||
Reference in New Issue
Block a user