Files
2026-05-09 17:32:17 +02:00

35 lines
650 B
PHP
Executable File

<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class BanPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_bans');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('manage_bans');
}
}