feat: Phase 2 - page CRUD, subscriber management, user management

This commit is contained in:
2026-04-03 21:15:40 +02:00
parent 78e1be3e3b
commit cf026f46b0
33 changed files with 1135 additions and 82 deletions

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
class UserPolicy
{
public function viewAny(User $user): bool
{
return $user->isSuperadmin();
}
public function create(User $user): bool
{
return $user->isSuperadmin();
}
public function update(User $user, User $target): bool
{
return $user->isSuperadmin();
}
public function delete(User $user, User $target): bool
{
if (! $user->isSuperadmin()) {
return false;
}
return $user->id !== $target->id;
}
}