From c950f954d1c8f51846883fd4e4cc3274fce7cbe9 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 20 Aug 2026 11:31:02 +0200 Subject: [PATCH] Admin-ToDo/Review-Seite + Staging-Self-Service-Admin-Login - admin-todo.html: mobile-freundliche ToDo/Review-Liste (Prioritaeten, Haekchen + Notizfelder je Punkt, localStorage, Notizen-Export), admin-gated, noindex. In admin-licenses.html Nav + Backend-Werkzeuge verlinkt. - admin.php: devPin auch bei STAGING=1 (v3, Mail bewusst tot) -> Self-Service- Admin-Login ohne Mailversand. Prod unveraendert (STAGING dort nie definiert, 2FA-Mail-Pflicht bleibt). Co-Authored-By: Claude Opus 4.8 --- App/admin-licenses.html | 2 + App/admin-todo.html | 178 ++++++++++++++++++++++++++++++++++++++++ App/php/api/admin.php | 10 ++- 3 files changed, 186 insertions(+), 4 deletions(-) create mode 100644 App/admin-todo.html diff --git a/App/admin-licenses.html b/App/admin-licenses.html index 2e89abd..c327fab 100644 --- a/App/admin-licenses.html +++ b/App/admin-licenses.html @@ -45,6 +45,7 @@ 🎨 Styleguide 👤 Admins 🍽️ Weltküche-Herkunft + 📋 ToDo / Review Logout @@ -57,6 +58,7 @@ 🏙️ Stadt-Raumplanung-Editor 📷 Schulbuch-Bildupload 🍽️ Weltküche-Herkunftsübersicht (QA) + 📋 ToDo / Review-Liste
Alle nur mit Admin-Login erreichbar. Schulbuch-Upload zusätzlich per PIN (0815). Heli-Audio-Werkzeuge liegen nur lokal (.LocalDeveloperTools) und sind nicht auf dem Server.
diff --git a/App/admin-todo.html b/App/admin-todo.html new file mode 100644 index 0000000..d346133 --- /dev/null +++ b/App/admin-todo.html @@ -0,0 +1,178 @@ + + + + + + + GeoGraSim — ToDo / Review (Admin) + + + + + +
+

GeoGraSim 📋 ToDo / Review

+ + ← Admin + Logout +
+ +
Prüfe Zugang…
+ + + + +
📝 Alle Review-Notizen
+
+ +
+
+
+ + + + diff --git a/App/php/api/admin.php b/App/php/api/admin.php index 02666e9..79148f5 100644 --- a/App/php/api/admin.php +++ b/App/php/api/admin.php @@ -46,11 +46,13 @@ if ($action === 'login') { unset($_SESSION['admin_id']); // Sicherstellen dass nicht schon eingeloggt $resp = ['message' => 'PIN wurde an Ihre E-Mail gesendet.', 'email' => maskEmail($admin['email_2fa'])]; - // Dev-Umgebung (localhost): es geht keine Mail raus → PIN direkt zurückgeben, - // damit man sich lokal anmelden kann. Auf Prod (IS_PRODUCTION) NIEMALS. - if (!IS_PRODUCTION) { + // Dev-Umgebung (localhost) ODER Staging (v3, STAGING=1 in .env.production, Mail + // bewusst tot): PIN direkt zurückgeben, damit man sich ohne Mailversand anmelden + // kann. Auf Prod (IS_PRODUCTION ohne STAGING) NIEMALS — dort greift 2FA per Mail. + $isStaging = defined('STAGING') && (STAGING === '1' || STAGING === 1 || STAGING === true); + if (!IS_PRODUCTION || $isStaging) { $resp['devPin'] = $pin; - $resp['message'] = 'Dev-Umgebung – kein Mailversand. PIN steht unten.'; + $resp['message'] = ($isStaging ? 'Staging' : 'Dev-Umgebung') . ' – kein Mailversand. PIN steht unten.'; } Response::ok($resp); }