Umsetzung von docs/specs/self-updater.md für Laravel: - Installierter Stand als SHA in storage/.version, Fortschritt in storage/.update-progress, selbstheilender Wartungsmodus in storage/.maintenance - Update-Client je Kanal (stable/development), nur HTTPS, begrenzte Redirects, ZIP-Download per Stream mit PK- und SHA-256-Prüfung - Entpacken mit zweistufigem ZIP-Slip-Schutz, Übernahme mit geschützten Pfaden (atomar je Datei, nie löschen), Migrationen, Cache- und OPcache-Reset - Lizenzspeicher außerhalb der DB, Geräte-ID als Zufallszahl, rotierendes Gerätetoken wird bei jeder Antwort (auch Fehler und Downloads) sofort gespeichert - Lizenzfehler mit verständlichen Meldungen – sie sperren nie das Portal - Seite „Aktualisierung“ mit Kanal, Suche, Changelog-Vorschau, Fortschritt, Migrationen, Änderungsprotokoll, Lizenz und Datenschutzhinweis - Wartungs-Middleware (503 + Retry-After) und Auto-Migration per Fingerabdruck - Audit-Log für Updates, Kanalwechsel und Lizenzänderungen - Version 0.2.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
41 lines
2.4 KiB
PHP
41 lines
2.4 KiB
PHP
<?php
|
||
|
||
use App\Http\Controllers\Admin\UpdateController;
|
||
use App\Http\Controllers\DashboardController;
|
||
use App\Http\Controllers\EventController;
|
||
use App\Http\Controllers\NewsController;
|
||
use App\Http\Controllers\PeopleController;
|
||
use App\Http\Controllers\ProfileController;
|
||
use Illuminate\Support\Facades\Route;
|
||
|
||
// Login, Logout und Passwort-Reset stellt Laravel Fortify bereit (FortifyServiceProvider).
|
||
|
||
Route::middleware('auth')->group(function () {
|
||
Route::get('/', DashboardController::class)->name('dashboard');
|
||
|
||
Route::get('/neuigkeiten', [NewsController::class, 'index'])->name('news.index');
|
||
Route::get('/neuigkeiten/{post:slug}', [NewsController::class, 'show'])->name('news.show');
|
||
|
||
Route::get('/termine', [EventController::class, 'index'])->name('events.index');
|
||
Route::get('/termine/{event}', [EventController::class, 'show'])->name('events.show');
|
||
Route::get('/termine/{event}/kalender.ics', [EventController::class, 'ics'])->name('events.ics');
|
||
|
||
Route::get('/personen', [PeopleController::class, 'index'])->name('people.index');
|
||
Route::get('/personen/{user}', [PeopleController::class, 'show'])->name('people.show');
|
||
|
||
Route::get('/profil', [ProfileController::class, 'show'])->name('profile.show');
|
||
Route::get('/profil/bearbeiten', [ProfileController::class, 'edit'])->name('profile.edit');
|
||
Route::put('/profil', [ProfileController::class, 'update'])->name('profile.update');
|
||
Route::post('/profil/bild', [ProfileController::class, 'updateAvatar'])->name('profile.avatar.update');
|
||
Route::delete('/profil/bild', [ProfileController::class, 'destroyAvatar'])->name('profile.avatar.destroy');
|
||
Route::put('/profil/darstellung', [ProfileController::class, 'updateTheme'])->name('profile.theme.update');
|
||
});
|
||
|
||
// Self-Updater (docs/specs/self-updater.md) – nur für Administratoren, CSRF über die web-Gruppe.
|
||
Route::middleware(['auth', 'can:admin'])->prefix('admin/update')->name('admin.update.')->group(function () {
|
||
Route::post('/check', [UpdateController::class, 'check'])->name('check');
|
||
Route::post('/install', [UpdateController::class, 'install'])->name('install');
|
||
Route::get('/progress', [UpdateController::class, 'progress'])->name('progress');
|
||
Route::post('/channel', [UpdateController::class, 'channel'])->name('channel');
|
||
Route::post('/migrations', [UpdateController::class, 'migrations'])->name('migrations');
|
||
});
|