Einfache Ansicht für Klienten (0.57.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 8m49s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 8m47s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 8m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 9m24s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 11m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m4s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m37s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 45s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m12s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 10m41s

Rollen-Schalter simple_ui: größere Schrift, Leichte Sprache automatisch,
Startseite mit großen Kacheln; Hinweis in „Was sieht wer?“.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-30 16:34:14 +00:00
parent cd5b23d166
commit b967c16b6d
147 changed files with 550 additions and 380 deletions

View file

@ -101,6 +101,18 @@ class User extends Authenticatable implements FilamentUser, HasAvatar
* Backend (/admin) nur für Rechte, die dort gepflegt werden. Wer nur Redaktionsrechte
* hat (Beiträge schreiben, Seiten bearbeiten …), arbeitet vollständig im Portal.
*/
private ?bool $simpleUi = null;
/**
* Einfache Ansicht (große Schrift, Leichte Sprache, einfache Startseite): wer eine Rolle
* mit „Einfache Ansicht“ hat – außer, wer den Admin-Bereich nutzt.
*/
public function usesSimpleUi(): bool
{
// rescue: während eines Updates kann die Spalte kurz noch fehlen
return $this->simpleUi ??= rescue(fn () => $this->roles()->where('simple_ui', true)->exists(), false, false) && ! $this->canAccessAdmin();
}
public function canAccessAdmin(): bool
{
if (! $this->is_active) {