security: Rechteausweitung schließen & Admin-Panel feingranular gaten (K1, H1, H2, M8)
- users:manage/roles:manage auf allen User-/Rollen-Masken erzwungen; is_super_admin aus $fillable entfernt und nur per autorisiertem forceFill setzbar; zentraler Gate::before-Super-Admin-Kurzschluss (K1/M8). - Nicht-Super-Admins können Super-Admin-Konten nicht mehr bearbeiten (Fix#2); Impersonation mit Rangprüfung, keine Token-Erstellung während Impersonation (H1). - Destruktive/verwaltende Admin-Aktionen (CRM/Billing/Compliance/Struktur) hängen an neuen admin-only Permissions; Editor behält reine Content-Rechte (H2). - Kanonischer Permission-Katalog (App\Authorization\Permission) als Single Source of Truth für Seeder und Monitoring. Deployment: `php artisan db:seed --class=RolesAndPermissionsSeeder` auf allen Umgebungen ausführen (neue Permissions). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
39e13d6d84
commit
77f8f9cb35
34 changed files with 748 additions and 100 deletions
|
|
@ -35,6 +35,8 @@ new #[Layout('components.layouts.app'), Title('Footer-Code anlegen')] class exte
|
|||
|
||||
public function save(): void
|
||||
{
|
||||
$this->authorize('footer-codes:manage');
|
||||
|
||||
$this->validate();
|
||||
|
||||
DB::transaction(function (): void {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ new #[Layout('components.layouts.app'), Title('Footer-Code bearbeiten')] class e
|
|||
|
||||
public function save(): void
|
||||
{
|
||||
$this->authorize('footer-codes:manage');
|
||||
|
||||
$this->validate();
|
||||
|
||||
$code = FooterCode::query()->findOrFail($this->id);
|
||||
|
|
@ -81,6 +83,8 @@ new #[Layout('components.layouts.app'), Title('Footer-Code bearbeiten')] class e
|
|||
|
||||
public function delete(): void
|
||||
{
|
||||
$this->authorize('footer-codes:manage');
|
||||
|
||||
$code = FooterCode::query()->findOrFail($this->id);
|
||||
$code->delete();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ new #[Layout('components.layouts.app'), Title('Footer-Codes')] class extends Com
|
|||
|
||||
public function toggleActive(int $id): void
|
||||
{
|
||||
$this->authorize('footer-codes:manage');
|
||||
|
||||
$footerCode = FooterCode::query()->find($id);
|
||||
|
||||
if (! $footerCode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue